Skip to content

gillstrom/merge-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Merge arrays in to the first array

Resources

License

Stars

Watchers

Forks

Packages

No packages published