1.0.0 • Published 9 years ago

merge-array v1.0.0

Weekly downloads
88
License
MIT
Repository
github
Last release
9 years ago

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