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

Dependencies (0)

    Dev Dependencies (3)

    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