Gathering detailed insights and metrics for safe-array-concat
Gathering detailed insights and metrics for safe-array-concat
Gathering detailed insights and metrics for safe-array-concat
Gathering detailed insights and metrics for safe-array-concat
`Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable
npm install safe-array-concat
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.7
Supply Chain
82.8
Quality
76.4
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
36 Commits
1 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Dec 12, 2024
Latest Version
1.1.3
Package Id
safe-array-concat@1.1.3
Unpacked Size
17.19 kB
Size
6.39 kB
File Count
11
NPM Version
10.9.2
Node Version
23.4.0
Published on
Dec 12, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
Array.prototype.concat
, but made safe by ignoring Symbol.isConcatSpreadable
1npm install --save safe-array-concat
1var safeConcat = require('safe-array-concat'); 2var assert = require('assert'); 3 4assert.deepEqual([].concat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with normal concat'); 5assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with safe concat'); 6 7String.prototype[Symbol.isConcatSpreadable] = true; 8assert.deepEqual([].concat('foo', Object('bar')), ['foo', 'b', 'a', 'r'], 'spreadable String objects are spread with normal concat!!!'); 9assert.deepEqual(safeConcat('foo', Object('bar')), ['foo', Object('bar')], 'spreadable String objects are not spread with safe concat'); 10 11Array.prototype[Symbol.isConcatSpreadable] = false; 12assert.deepEqual([].concat([1, 2], 3, [[4]]), [[], [1, 2], 3, [[4]]], 'non-concat-spreadable arrays do not spread with normal concat!!!'); 13assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'non-concat-spreadable arrays still spread with safe concat');
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More