merge-all
v1.0.0
Published
Merge all Objects in an Array
Downloads
2
Maintainers
Readme
merge-all
Merge all Objects in an Array
Installation
Install merge-all
using npm:
npm install --save merge-all
Usage
Module usage
var mergeAll = require('merge-all');
mergeAll([{a: {b: 1}, c: {d: 1}}, {a: {b: 2}, c: {e: 2}}, {c: {e: 1}}]);
// {a: {b: 2}, c: {d: 1, e: 1}}
API
mergeAll(arr)
| Name | Type | Description |
|------|------|-------------|
| arr | Array
| A collection of objects to merge |
Returns: Object
, the merged object.
License
MIT © Joakim Carlstein