Installations
npm install @jridgewell/set-array
Developer
jridgewell
Developer Guide
Module System
CommonJS, ESM
Min. Node Version
>=6.0.0
Typescript Support
No
Node Version
20.10.0
NPM Version
10.2.3
Statistics
3 Stars
21 Commits
1 Forks
3 Watching
1 Branches
1 Contributors
Updated on 13 Oct 2024
Bundle Size
809.00 B
Minified
391.00 B
Minified + Gzipped
Languages
TypeScript (79.1%)
JavaScript (20.9%)
Total Downloads
Cumulative downloads
Total Downloads
3,544,011,991
Last day
-2.2%
8,256,483
Compared to previous day
Last week
3.5%
44,286,340
Compared to previous week
Last month
13.1%
181,440,418
Compared to previous month
Last year
37.9%
1,787,468,509
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
@jridgewell/set-array
Like a Set, but provides the index of the
key
in the backing array
This is designed to allow synchronizing a second array with the contents of the backing array, like
how in a sourcemap sourcesContent[i]
is the source content associated with source[i]
, and there
are never duplicates.
Installation
1npm install @jridgewell/set-array
Usage
1import { SetArray, get, put, pop } from '@jridgewell/set-array'; 2 3const sa = new SetArray(); 4 5let index = put(sa, 'first'); 6assert.strictEqual(index, 0); 7 8index = put(sa, 'second'); 9assert.strictEqual(index, 1); 10 11assert.deepEqual(sa.array, [ 'first', 'second' ]); 12 13index = get(sa, 'first'); 14assert.strictEqual(index, 0); 15 16pop(sa); 17index = get(sa, 'second'); 18assert.strictEqual(index, undefined); 19assert.deepEqual(sa.array, [ 'first' ]);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
8 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Reason
Found 0/21 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
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jridgewell/set-array/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/jridgewell/set-array/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jridgewell/set-array/test.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:22
- Info: 0 out of 3 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Score
2.7
/10
Last Scanned on 2024-11-18
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 MoreOther packages similar to @jridgewell/set-array
@jridgewell/source-map
Packages @jridgewell/trace-mapping and @jridgewell/gen-mapping into the familiar source-map API
@jridgewell/gen-mapping
Generate source maps
@jridgewell/sourcemap-codec
Encode/decode sourcemap mappings
@jridgewell/trace-mapping
Trace the original position through a source map