DefaultsDeep recursively merges object properties from all supplied objects with object values being merged recursively and once a property is set, additional values of the same property are ignored.
object
(object): input objectsources
(...object): input source object(s)
(object): returns an object with all included object properties merged
const result = objects.defaultsDeep({ a: { b: [3, 4] } }, { a: { b: [9, 18, 15], c: 3 } });
console.log(result);
> { a: { b: [ 3, 4, 15 ], c: 3 } }