clear()is still keeping references to the elements (#47)
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
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.
The npm package denque receives a total of 7,160,227 weekly downloads. As such, denque popularity was classified as popular.
We found that denque demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.