next-merge
Recursively merges own enumerable properties of the source object(s).
installation
npm install -S @jswork/next-merge
usage
import '@jswork/next-merge';
const object = {
'a': [{ 'b': 2 }, { 'd': 4 }]
};
const other = {
'a': [{ 'c': 3 }, { 'e': 5 }]
};
const res = nx.merge(object, other);
conosle.log(res);
conosle.log(res === object);
// { a: [ { b: 2, c: 3 }, { d: 4, e: 5 } ] }
// true
license
Code released under the MIT license.