Ember.copy()

copy (obj, deep) Objectpublic

Defined in packages/ember-runtime/lib/copy.js:66

Creates a shallow copy of the passed object. A deep copy of the object is returned if the optional deep argument is true.

If the passed object implements the Ember.Copyable interface, then this function will delegate to the object's copy() method and return the result. See Ember.Copyable for further details.

For primitive values (which are immutable in JavaScript), the passed object is simply returned.

Parameters:

obj Object
The object to clone
deep [Boolean]
If true, a deep copy of the object is made.

Returns:

Object
The copied object
doc_EmberJs
2016-11-30 16:51:22
Comments
Leave a Comment

Please login to continue.