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:
545 bytes
|
Line | |
---|
1 | var $ = require('../internals/export');
|
---|
2 | var fails = require('../internals/fails');
|
---|
3 | var isObject = require('../internals/is-object');
|
---|
4 |
|
---|
5 | // eslint-disable-next-line es/no-object-isfrozen -- safe
|
---|
6 | var $isFrozen = Object.isFrozen;
|
---|
7 | var FAILS_ON_PRIMITIVES = fails(function () { $isFrozen(1); });
|
---|
8 |
|
---|
9 | // `Object.isFrozen` method
|
---|
10 | // https://tc39.es/ecma262/#sec-object.isfrozen
|
---|
11 | $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
---|
12 | isFrozen: function isFrozen(it) {
|
---|
13 | return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
|
---|
14 | }
|
---|
15 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.