merge-and-concat
v1.0.2
Published
Merge objects and concatenating arrays inside them
Downloads
2,603
Maintainers
Readme
merge-and-concat
Merge objects and concatenating arrays inside them
Install
npm install --save merge-and-concat
Usage
import mergeAndConcat from 'merge-and-concat';
mergeAndConcat(
{ hey: 'hey', list: [1, 2] },
{ ho: 'ho', list: [3, 4] },
{ uni: 'corns' }
); // { hey: 'hey', ho: 'ho', uni: 'corns', list: [1, 2, 3, 4] }
// removing dupes
mergeAndConcat(
{ after_script: ['npm run coverage'] },
{ after_script: ['npm run coverage'] }
); // { after_script: ['npm run coverage'] }
API
mergeAndConcat(...objects)
objects
Required
Type: each item is Object
Set of objects
License
MIT © Vladimir Starkov