Gathering detailed insights and metrics for array-limited
Gathering detailed insights and metrics for array-limited
Gathering detailed insights and metrics for array-limited
Gathering detailed insights and metrics for array-limited
npm install array-limited
Typescript
Module System
Node Version
NPM Version
65.4
Supply Chain
86.5
Quality
75.5
Maintenance
100
Vulnerability
99.1
License
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
17 Commits
2 Forks
1 Watchers
1 Branches
3 Contributors
Updated on Aug 30, 2023
Latest Version
0.0.7
Package Id
array-limited@0.0.7
Unpacked Size
3.73 kB
Size
1.44 kB
File Count
4
NPM Version
9.6.7
Node Version
16.15.1
Published on
Aug 31, 2023
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
Simple limited arrays in length.
This package is a mini array cache. You specify the max number of items you want and it will push out of the list the elements at the beginning of the array.
Yarn
yarn add array-limited
Npm
npm i array-limited
To have max 3 items and push to the list
1import { ArrayLimited } from 'array-limited'; 2const lmtArray = new ArrayLimited(3) 3lmtArray.push(1) 4lmtArray.push(2) 5lmtArray.push(3) 6console.log(lmtArray.values) 7// ouput: [1, 2, 3] 8lmtArray.push(4) 9console.log(lmtArray.values) 10// ouput: [2, 3, 4]
You can also add items to the front to kick items at the out.
1import { ArrayLimited } from 'array-limited'; 2const lmtArray = new ArrayLimited(3) 3lmtArray.push(1) 4lmtArray.push(2) 5lmtArray.push(3) 6console.log(lmtArray.values) 7// ouput: [1, 2, 3] 8lmtArray.pushFront(4) 9console.log(lmtArray.values) 10// ouput: [4, 1, 2]
Finally you can check if the array is already filled.
1import { ArrayLimited } from 'array-limited'; 2const lmtArray = new ArrayLimited(3) 3console.log(lmtArray.isFilled()) 4// ouput: false 5lmtArray.push(1) 6lmtArray.push(2) 7lmtArray.push(3) 8console.log(lmtArray.isFilled()) 9// ouput: true
Author: Burlet Mederic
Licence: GPL-3-0-only
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/15 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
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