window.Object Class

Defined in: window.Object:8
Module: Core

Add methods to Object

Methods

clone

() Object

Defined in clone:107

Creates a shallow copy of the object.

Returns:

Object:

The shallow copy.

isPlain

(
  • target
)
Boolean
static

Defined in isPlain:53

Check to see if an object is a plain object definition

Parameters:

  • target Object

    The target object

Returns:

Boolean:

If the object is plain

merge

(
  • target
  • source
)
static

Defined in merge:13

Merges two (or more) objects, giving the last one precedence

Parameters:

  • target Object

    The target object

  • source Object multiple

    Additional objects to add

Example:

    var obj1 = { id : 'foo', name : 'Hello!', value : 100 };
    var obj2 = { id : 'bar', value : 200 };
    Object.merge({}, obj1, obj2); // Returns: { id : 'bar', name : 'Hello!', value : 200 }