Skip to content

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.

License

Notifications You must be signed in to change notification settings

invertase/denque

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jul 18, 2022
539105b · Jul 18, 2022
Aug 19, 2021
Jul 16, 2022
Aug 18, 2021
Aug 18, 2021
Jul 2, 2016
Jul 2, 2016
Aug 18, 2021
Jul 18, 2022
Aug 19, 2021
Aug 18, 2021
Aug 18, 2021
Aug 29, 2021
Jul 18, 2022
Jul 18, 2022
Jul 18, 2022

Repository files navigation

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.

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published