{"size": 906, "ext": "js", "max_stars_repo_path": "packages/apollo-utilities/lib/util/maybeDeepFreeze.js", "max_stars_repo_name": "adilbenmoussa/apollo-client", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/apollo-utilities/lib/util/maybeDeepFreeze.js", "max_issues_repo_name": "adilbenmoussa/apollo-client", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/apollo-utilities/lib/util/maybeDeepFreeze.js", "max_forks_repo_name": "adilbenmoussa/apollo-client", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.6470588235, "max_line_length": 73, "alphanum_fraction": 0.5949227373}
define(['require', 'exports', './environment'], function(
  require,
  exports,
  environment_1,
) {
  'use strict';
  Object.defineProperty(exports, '__esModule', { value: true });
  function deepFreeze(o) {
    Object.freeze(o);
    Object.getOwnPropertyNames(o).forEach(function(prop) {
      if (
        o[prop] !== null &&
        (typeof o[prop] === 'object' || typeof o[prop] === 'function') &&
        !Object.isFrozen(o[prop])
      ) {
        deepFreeze(o[prop]);
      }
    });
    return o;
  }
  function maybeDeepFreeze(obj) {
    if (environment_1.isDevelopment() || environment_1.isTest()) {
      var symbolIsPolyfilled =
        typeof Symbol === 'function' && typeof Symbol('') === 'string';
      if (!symbolIsPolyfilled) {
        return deepFreeze(obj);
      }
    }
    return obj;
  }
  exports.maybeDeepFreeze = maybeDeepFreeze;
});
//# sourceMappingURL=maybeDeepFreeze.js.map
