@frosted/array-concat
v1.0.0
Published
merge arrays together
Maintainers
Readme
@frosted/array-at
Ponyfill for Array.prototype.concat
Installation
npm install @frosted/array-concatUsage
const concat = require("@frosted/array-concat")
console.log(concat([1, 2], [3])) // [1, 2, 3]
console.log(concat()) // []
console.log(concat([1])) // [1]
console.log(concat("not an array")) // Error: concat expects all arguments to be arraysShimming Array.prototype.at:
require("@frosted/array-concat/shim")
console.log([1, 2, 3].concat([4, 5, 6])) // [1, 2, 3, 4, 5, 6]Tests
Simply clone the repo and run npm test
