Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/bjarneo/recursiveobjectmerge
- Owner: bjarneo
- License: mit
- Created: 2014-11-23T13:40:01.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-29T19:12:38.000Z (almost 10 years ago)
- Last Synced: 2024-11-10T06:43:56.443Z (3 days ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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'
*/
```