1.0.6 • Published 2 months ago

merge-array-object v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
2 months ago

merge

CI npm version NPM Downloads Coverage Status

Concat array and merge object

Install

npm i merge-array-object

Usage

var merge = require('merge-array-object');

var a = {a: [1], b: 1, c: 1 }; 
var b = {a: [2], b: 2, d: 2 };

var result = merge(a,b);

// result
{
  a: [1, 2],
  b: 2,
  c: 1,
  d: 2
}

noDuplicates

var a = {ary: ['foo', 'bar']};
var b = {ary: ['bar', 'baz']};

console.log(merge.noDuplicates(b, a));  // {ary: ['foo', 'bar', 'baz']}
console.log(merge(b, a));               // {ary: ['foo', 'bar', 'bar', 'baz']}

Contributors

As always, thanks to our amazing contributors!

Made with contributors.

License

Licensed under the MIT License.

1.0.6

2 months ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago