@jswork/next-merge

1.0.0 • Public • Published

next-merge

Recursively merges own enumerable properties of the source object(s).

version license size download

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.

Readme

Keywords

Package Sidebar

Install

npm i @jswork/next-merge

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.54 kB

Total Files

3

Last publish

Collaborators

  • afeiship