Object.isSealed()
ES5+Determines if an object is sealed.
Syntax
Object.isSealed(obj)Parameters
obj Object The object to check
Return Value
boolean
true if the object is sealed, otherwise false
Examples
JavaScript
const obj = { a: 1 };
console.log(Object.isSealed(obj));
Object.seal(obj);
console.log(Object.isSealed(obj)); Output:
// false
true