The js.lib.Object constructor creates an object wrapper.

Documentation Object by Mozilla Contributors, licensed under CC-BY-SA 2.5.

Static variables

staticread onlyprototype:ObjectPrototype

Allows the addition of properties to all objects of type Object.

Static methods

staticassign<T>(target:T, sources:Rest<{}>):T

Copies the values of all enumerable own properties from one or more source objects to a target object.

staticcreate<T>(proto:{}, ?propertiesObject:DynamicAccess<ObjectPropertyDescriptor>):T

Creates a new object with the specified prototype object and properties.

staticdefineProperties<T>(obj:T, props:DynamicAccess<ObjectPropertyDescriptor>):T

Adds the named properties described by the given descriptors to an object.

staticdefineProperty<T>(obj:T, prop:String, descriptor:ObjectPropertyDescriptor):T

staticdefineProperty<T>(obj:T, prop:Symbol, descriptor:ObjectPropertyDescriptor):T

Adds the named property described by a given descriptor to an object.


Returns an array containing all of the [key, value] pairs of a given object's own enumerable string properties.


Freezes an object: other code can't delete or change any properties.


Returns a new object from an iterable of key-value pairs (reverses Object.entries).

staticgetOwnPropertyDescriptor(obj:{}, prop:String):Null<ObjectPropertyDescriptor>

staticgetOwnPropertyDescriptor<T>(target:Array<T>, propertyKey:Int):Null<ObjectPropertyDescriptor>

staticgetOwnPropertyDescriptor(obj:{}, prop:Symbol):Null<ObjectPropertyDescriptor>

Returns a property descriptor for a named property on an object.


Returns an array containing the names of all of the given object's own enumerable and non-enumerable properties.


Returns an array of all symbol properties found directly upon a given object.


Returns the prototype of the specified object.

staticis<T>(value1:T, value2:T):Bool

Compares if two values are the same value. Equates all NaN values (which differs from both Abstract Equality Comparison and Strict Equality Comparison).


Determines if extending of an object is allowed.


Determines if an object was frozen.


Determines if an object is sealed.


Returns an array containing the names of all of the given object's own enumerable string properties.


Prevents any extensions of an object.


Prevents other code from deleting properties of an object.

staticsetPrototypeOf<T>(obj:T, prototype:Null<{}>):T

Sets the prototype (i.e., the internal Prototype property).


Returns an array containing the values that correspond to all of a given object's own enumerable string properties.



The Object constructor creates an object wrapper.