Performs object extension by merging source objects into a target object. Copies are always deep.
If during merging a key in the target object exists it is overwritten with the source object's value. Usage is the same as jQuery.extend(true, ...)
, but values that are undefined
are NOT ignored.
For shallow copies, you may use Object.assign
, but note that Object.assign
only copies enumerable and own properties and doesn't copy properties on the prototype and non-enumerable properties.
Param | Type | Default Value | Description |
---|---|---|---|
target | object | The object that will receive new properties | |
source? | object | One or more objects which get merged into the target object |
Method | Description |
---|