JS: Object.isSealed

JS: Object.isSealed

Object.isSealed(obj)

Return true if object obj is sealed, else false.

[see JS: Object.seal]

[see JS: Prevent Adding Property]

const x3 = {};
console.log(Object.isSealed(x3)); // false
Object.seal(x3);
console.log(Object.isSealed(x3)); // true

Reference

ECMAScript® 2016 Language Specification#sec-object.issealed

Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth