Skip to content

Object

toString() function

Return a string representing this object. By default, it returns a string of the form '[object ]', where is the object's class.

Returns: A string that describes the object.

toLocaleString() function

Return a localized string representation of this object, calling toString() by default or a locale-specific override if defined.

Returns: A locale-sensitive string representation of the object.

valueOf() function

Return the primitive value of this object if one exists. Typically, an object returns itself, while a wrapped type (e.g. Number, String) may return the underlying primitive value.

Returns: The primitive value of the object, or the object itself.

hasOwnProperty(prop) function

Return a boolean indicating whether the object has a property with the specified name (key) as its own direct property, as opposed to inheriting it. It does not check the prototype chain.

prop: The name or Symbol of the property to test.

Returns: True if the property is found directly on the object, otherwise false.

isPrototypeOf(obj) function

Return true if the object appears anywhere in the prototype chain of the specified object, otherwise false.

obj: The object whose prototype chain will be checked.

Returns: True if this object is in 'obj's prototype chain, otherwise false.

propertyIsEnumerable(prop) function

Return a boolean indicating whether the specified property is enumerable, i.e., whether it shows up in a for...in loop or Object.keys() on the object.

prop: The name or Symbol of the property to test.

Returns: True if the property is found and enumerable, otherwise false.

proto accessor

defineGetter() function

defineSetter() function

lookupGetter() function

lookupSetter() function

mixin(obj) function

Mix properties from 'obj' into the current object. If 'obj' is a string, it first calls 'use(obj)' to retrieve the object.

obj: The object (or string reference to an object) to mix in.

Returns: None