You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hjl
9372f6120a
|
1 month ago | |
---|---|---|
.. | ||
CHANGELOG.md | 1 month ago | |
LICENSE | 1 month ago | |
README.md | 1 month ago | |
index.d.ts | 1 month ago | |
index.js | 1 month ago | |
package.json | 1 month ago |
README.md
Denque
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
Quick Start
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.
Who's using it?
- Kafka Node.js client
- MariaDB Node.js client
- MongoDB Node.js client
- MySQL Node.js client
- Redis Node.js clients
... and many more.
License
- See LICENSE
Built and maintained by Invertase.