2.0.0 • Published 6 years ago

concat-arrays v2.0.0

Weekly downloads
31
License
ISC
Repository
github
Last release
6 years ago

concat-arrays

Greenkeeper badge

Concatenates arrays or array-like objects (arguments)

var concat = require('concat-arrays')
concat([1, 2], [3, 4], [4]) // returns [1, 2, 3, 4, 4]

// Unlike [].concat, this module also works with arguments
function appendOne () {
    return concat(arguments, [1])
}

appendOne('3', '2') // returns [3, 2, 1]

// It rejects falsy values
concat(null, [], undefined) // returns []