Skip to content

Merge objects and concatenating arrays inside them

Notifications You must be signed in to change notification settings

I-We/merge-and-concat

 
 

Repository files navigation

merge-and-concat

NPM version Unix Build Status Windows Build Status Coveralls Status Dependency Status

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

About

Merge objects and concatenating arrays inside them

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%