assignDeep
Assign one objects values to another, and performs the same action for all child values.
.assignDeep(target, source)
Copies the values (and properties if map-like) from source onto target and repeates for all child
values.
For map-like objects, every enumerable property on target is copied:
var target = {name: {first: "Justin"}};
var source = {name: {last: "Meyer"}};
var restult = canReflect.assignDeep(target, source);
target //-> {name: {first: "Justin", last: "Meyer"}}
An object can control the behavior of assignDeep using the can.assignDeep symbol.
Parameters
- target
{Object}:The value that will be updated with
source's values. - source
{Object}:A source of values to copy to
target.
Returns
{Object}:
The target.