source: trip-planner-front/node_modules/core-js/modules/es.object.prevent-extensions.js@ 571e0df

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

initial commit

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