2020-08-26 01:57:08 +02:00
|
|
|
'use strict';
|
|
|
|
|
2021-02-26 04:58:33 +01:00
|
|
|
var GetIntrinsic = require('get-intrinsic');
|
2020-08-26 01:57:08 +02:00
|
|
|
|
|
|
|
var $Object = GetIntrinsic('%Object%');
|
|
|
|
|
|
|
|
var isPrimitive = require('../helpers/isPrimitive');
|
|
|
|
|
|
|
|
var $preventExtensions = $Object.preventExtensions;
|
|
|
|
var $isExtensible = $Object.isExtensible;
|
|
|
|
|
2021-02-26 04:58:33 +01:00
|
|
|
// https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
|
2020-08-26 01:57:08 +02:00
|
|
|
|
|
|
|
module.exports = $preventExtensions
|
|
|
|
? function IsExtensible(obj) {
|
|
|
|
return !isPrimitive(obj) && $isExtensible(obj);
|
|
|
|
}
|
|
|
|
: function IsExtensible(obj) {
|
|
|
|
return !isPrimitive(obj);
|
|
|
|
};
|