A recursive assignment of of properties from sources into target. The recursive means that object properties will be merged and not replaced.
Object to which the properties are assigned.
Objects from where the properties are read.
the target
import assignRecursiveWithPrototype from "apprt-core/assignRecursiveWithPrototype";const a: any = { x: 1, z: { a: 1 } };const b = { x: 2, z: { b: 1 } };const a1 = assignRecursiveWithPrototype(a, b);a1 === a; // -> true// a1 is {x:2, z: { a: 1, b: 1 }} Copy
import assignRecursiveWithPrototype from "apprt-core/assignRecursiveWithPrototype";const a: any = { x: 1, z: { a: 1 } };const b = { x: 2, z: { b: 1 } };const a1 = assignRecursiveWithPrototype(a, b);a1 === a; // -> true// a1 is {x:2, z: { a: 1, b: 1 }}
A recursive assignment of of properties from sources into target. The recursive means that object properties will be merged and not replaced.