Skip to content

Deep merges objects, concatenating arrays.

License

Notifications You must be signed in to change notification settings

fabiospampinato/conf-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conf Merge

Deep merges objects, concatenating arrays.

Install

npm install --save conf-merge

Usage

import confMerge from 'conf-merge';

const obj1 = {
  foo: [1, 2],
  bar: {
    baz: true
  }
};

const obj2 = {
  foo: [3, 4],
  bar: {
    qux: true
  }
};

confMerge ( {}, obj1, obj2 );
// => {
//   foo: [1, 2, 3, 4],
//   bar: {
//     baz: true,
//     qux: true
//   }
// }

License

MIT © Fabio Spampinato