Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bjarneo/recursiveobjectmerge

Merge as many objects you want to one object recursive.
https://github.com/bjarneo/recursiveobjectmerge

Last synced: 3 days ago
JSON representation

Merge as many objects you want to one object recursive.

Awesome Lists containing this project

README

        

RecursiveObjectMerge
==

Merge as many objects you want to one object recursive.

#Install:
```bash
npm install --save recursiveobjectmerge
```

##Documentation:

####recursiveObjectMerge();
```javascript
var recursiveObjectMerge = require('recursiveobjectmerge');

recursiveObjectMerge(
{ a: 'a', b: 'b', c: ['a', 'b', 'c'] },
{ a: { a: 'a', b: 'b', c: ['a', 'b', 'c'] }, d: 'd'},
{ b: { a: { a: 'a', b: 'b', c: ['a', 'b', 'c'] } } },
{ b: { a: { a: 'a', e: 'e', c: ['c', 'a', 'b'] } } }
);
/*
a: { a: 'a', b: 'b', c: [ 'a', 'b', 'c' ] },
b: { a: { a: 'a', b: 'b', c: ['c', 'a', 'b'], e: 'e' } },
c: [ 'a', 'b', 'c' ],
d: 'd'
*/
```