source: trip-planner-front/node_modules/core-js/modules/es.object.freeze.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 659 bytes
Line 
1var $ = require('../internals/export');
2var FREEZING = require('../internals/freezing');
3var fails = require('../internals/fails');
4var isObject = require('../internals/is-object');
5var onFreeze = require('../internals/internal-metadata').onFreeze;
6
7// eslint-disable-next-line es/no-object-freeze -- safe
8var $freeze = Object.freeze;
9var FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });
10
11// `Object.freeze` method
12// https://tc39.es/ecma262/#sec-object.freeze
13$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
14 freeze: function freeze(it) {
15 return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;
16 }
17});
Note: See TracBrowser for help on using the repository browser.