denque
The fastest javascript implementation of a double-ended queue. Used by the official Redis, MongoDB, MariaDB & MySQL libraries for Node.js and many other libraries. Maintains compatability with deque.
Last updated 3 years ago by salakar .
Apache-2.0 · Repository · Bugs · Original npm
$ cnpm install denque 
SYNC missed versions from official npm registry.

Denque

NPM downloads NPM version Tests status Coverage License Follow on Twitter

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?

... and many more.


License


Built and maintained by Invertase.

Current Tags

  • 2.1.0                                ...           latest (3 years ago)

3 Versions

  • 2.1.0                                ...           3 years ago
  • 1.5.0                                ...           5 years ago
  • 1.4.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org