main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
504 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var GetIntrinsic = require('get-intrinsic');
|
---|
| 4 |
|
---|
| 5 | var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
|
---|
| 6 | var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
|
---|
| 7 |
|
---|
| 8 | var isPrimitive = require('../helpers/isPrimitive');
|
---|
| 9 |
|
---|
| 10 | // https://262.ecma-international.org/6.0/#sec-isextensible-o
|
---|
| 11 |
|
---|
| 12 | module.exports = $preventExtensions
|
---|
| 13 | ? function IsExtensible(obj) {
|
---|
| 14 | return !isPrimitive(obj) && $isExtensible(obj);
|
---|
| 15 | }
|
---|
| 16 | : function IsExtensible(obj) {
|
---|
| 17 | return !isPrimitive(obj);
|
---|
| 18 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.