source: imaps-frontend/node_modules/core-js/modules/es.object.freeze.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

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