merge-array

1.0.0 • Public • Published

merge-array Build Status

Merge arrays in to the first array

Install

$ npm install --save merge-array

Usage

var mergeArray = require('merge-array');
var arr = ['foo'];
 
mergeArray(arr, ['bar']);
console.log(arr);
//=> ['foo', 'bar']
 
mergeArray(arr, ['hello'], ['you']);
console.log(arr);
//=> ['foo', 'bar', 'hello', 'you']

API

mergeArray(input, array, [array, ...])

input

Type: array

Array to merge in to.

array

Type: array

Array to merge in to the first array.

License

MIT © Andreas Gillström

Package Sidebar

Install

npm i merge-array

Weekly Downloads

117

Version

1.0.0

License

MIT

Last publish

Collaborators

  • gillstrom