limited-array
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

LimitedArray

This is data structure very similar to the queue.

let limitedArray = new LimitedArray({ limit : 20});
 
limitedArray.add(0);
limitedArray.add(1);
...
limitedArray.add(21);
// first element will be deleted, second element will be first
console.log(limitedArray.at(0) === 1) // true

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.3
    29
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.3
    29
  • 2.0.2
    0
  • 2.0.1
    0
  • 2.0.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i limited-array

Weekly Downloads

29

Version

2.0.3

License

ISC

Unpacked Size

11.5 kB

Total Files

18

Last publish

Collaborators

  • alexsergey