package
`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable
npm install safe-array-concatGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Array.prototype.concat, but made safe by ignoring Symbol.isConcatSpreadable
npm install --save safe-array-concatvar safeConcat = require('safe-array-concat');
var assert = require('assert');
assert.deepEqual([].concat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with normal concat');
assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with safe concat');
String.prototype[Symbol.isConcatSpreadable] =
Simply clone the repo, npm install, and run npm test
Estimated unpacked size across 17 packages.
295.7 kB
Includes dependencies.
5 direct dependencies.
^2.0.5
2.0.5
^1.0.9
1.0.9
^1.0.4
1.0.4
^1.1.0
1.1.0
^1.3.0
1.3.0