|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
789 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var fails = require('../internals/fails');
|
|---|
| 3 | var isObject = require('../internals/is-object');
|
|---|
| 4 | var classof = require('../internals/classof-raw');
|
|---|
| 5 | var ARRAY_BUFFER_NON_EXTENSIBLE = require('../internals/array-buffer-non-extensible');
|
|---|
| 6 |
|
|---|
| 7 | // eslint-disable-next-line es/no-object-isextensible -- safe
|
|---|
| 8 | var $isExtensible = Object.isExtensible;
|
|---|
| 9 | var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
|
|---|
| 10 |
|
|---|
| 11 | // `Object.isExtensible` method
|
|---|
| 12 | // https://tc39.es/ecma262/#sec-object.isextensible
|
|---|
| 13 | module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {
|
|---|
| 14 | if (!isObject(it)) return false;
|
|---|
| 15 | if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false;
|
|---|
| 16 | return $isExtensible ? $isExtensible(it) : true;
|
|---|
| 17 | } : $isExtensible;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.