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:
800 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var fails = require('../internals/fails');
|
---|
4 | var isObject = require('../internals/is-object');
|
---|
5 | var classof = require('../internals/classof-raw');
|
---|
6 | var ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');
|
---|
7 |
|
---|
8 | // eslint-disable-next-line es/no-object-issealed -- safe
|
---|
9 | var $isSealed = Object.isSealed;
|
---|
10 |
|
---|
11 | var FORCED = ARRAY_BUFFER_NON_EXTENSIBLE || fails(function () { $isSealed(1); });
|
---|
12 |
|
---|
13 | // `Object.isSealed` method
|
---|
14 | // https://tc39.es/ecma262/#sec-object.issealed
|
---|
15 | $({ target: 'Object', stat: true, forced: FORCED }, {
|
---|
16 | isSealed: function isSealed(it) {
|
---|
17 | if (!isObject(it)) return true;
|
---|
18 | if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return true;
|
---|
19 | return $isSealed ? $isSealed(it) : false;
|
---|
20 | }
|
---|
21 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.