Object

Object.isSealed

Determines if an object is sealed

Syntax

JavaScript
Object.isSealed(obj)

Parameters

ParameterTypeDescription
objanyThe object to check

Return Value

true if the object is sealed, false otherwise

Examples

Basic Usage
const obj = { a: 1 };
console.log(Object.isSealed(obj)); // false
Object.seal(obj);
console.log(Object.isSealed(obj)); // true
Practical Example
const frozen = Object.freeze({ x: 1 });
console.log(Object.isSealed(frozen)); // true (frozen objects are also sealed)
Advanced Usage
console.log(Object.isSealed(42)); // true

Understanding Object.isSealed

The Object.isSealed method in JavaScript determines if an object is sealed. It belongs to the Object object and is one of the most widely used methods for working with object values in modern JavaScript and TypeScript applications.

The method signature is Object.isSealed(obj). It accepts 1 parameter: obj. When called, it returns true if the object is sealed, false otherwise. Understanding when and how to use isSealed() helps you write more expressive, readable code.

Common use cases for Object.isSealed include data transformation, input validation, API response processing, and building reusable utility functions. It works well alongside related methods like object-seal, object-freeze, object-isfrozen, enabling you to chain operations together for complex data manipulation pipelines.

Browser support for Object.isSealed is excellent across all modern browsers including Chrome, Firefox, Safari, and Edge. It is also fully supported in Node.js and Deno. For older environments, transpilation with Babel or a polyfill may be needed.

Browser Compatibility

Supported in all modern browsers (Chrome, Firefox, Safari, Edge) and Node.js. Part of the ECMAScript standard.

Related Methods

More Object Methods

Other methods in the Object object

Related Tools

More Object Methods

Explore JavaScript Methods

Browse our complete reference of 410 JavaScript methods with syntax, examples, and explanations.