JS: Object.isExtensible 👎
Object.isExtensible(obj)-
Return
trueif a object obj is an object and is extensible , elsefalse.🛑 warning: if the argument is not an object, it does not throw error. just return false.
🟢 tip: Better is Reflect.isExtensible . It throws error if arg is not object.
console.assert(Object.isExtensible({})); // if the argument is not an object, it does not throw error. just return false. console.assert(Object.isExtensible(3) === false);