class Object
package js.lib
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.
staticentries(obj:{}):Array<ObjectEntry>
Returns an array containing all of the [key, value] pairs of a given object's own enumerable string properties.
staticfromEntries<T>(iterable:Any):T
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.
staticgetOwnPropertyNames(obj:{}):Array<String>
Returns an array containing the names of all of the given object's own enumerable and non-enumerable properties.
staticgetOwnPropertySymbols(obj:{}):Array<Symbol>
Returns an array of all symbol properties found directly upon a given 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).
statickeys(obj:{}):Array<String>
Returns an array containing the names of all of the given object's own enumerable string properties.
staticsetPrototypeOf<T>(obj:T, prototype:Null<{}>):T
Sets the prototype (i.e., the internal Prototype property).