![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | CHANGELOG.md | 2 years ago | 142 | |
![]() | LICENSE | 2 years ago | 595 | |
![]() | README.md | 2 years ago | 2.8K | 9b1f1b9 rm old utils [كارل مبارك] |
![]() | index.d.ts | 2 years ago | 727 | |
![]() | index.js | 2 years ago | 11K | 8b8b68d rm everythin MOTD related [كارل مبارك] |
![]() | package.json | 2 years ago | 1.6K | 2324c9f added npm start script [كارل مبارك] |
Denque is a well tested, extremely fast and lightweight double-ended queue implementation with zero dependencies and includes TypeScript types.
Double-ended queues can also be used as a:
This implementation is currently the fastest available, even faster than double-ended-queue
, see the benchmarks.
Every queue operation is done at a constant O(1)
- including random access from .peekAt(index)
.
Works on all node versions >= v0.10
Install the package:
npm install denque
Create and consume a queue:
const Denque = require("denque");
const denque = new Denque([1,2,3,4]);
denque.shift(); // 1
denque.pop(); // 4
See the API reference documentation for more examples.
... and many more.
Built and maintained by Invertase.