SkillAgentSearch skills...

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.

Install / Use

/learn @invertase/Denque
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <h1 align="center">Denque</h1> </p> <p align="center"> <a href="https://www.npmjs.com/package/denque"><img src="https://img.shields.io/npm/dm/denque.svg?style=flat-square" alt="NPM downloads"></a> <a href="https://www.npmjs.com/package/denque"><img src="https://img.shields.io/npm/v/denque.svg?style=flat-square" alt="NPM version"></a> <a href="https://github.com/invertase/denque/actions/workflows/testing.yam"><img src="https://github.com/invertase/denque/actions/workflows/testing.yaml/badge.svg" alt="Tests status"></a> <a href="https://codecov.io/gh/invertase/denque"><img src="https://codecov.io/gh/invertase/denque/branch/master/graph/badge.svg?token=rn91iI4bSe" alt="Coverage"></a> <a href="/LICENSE"><img src="https://img.shields.io/npm/l/denque.svg?style=flat-square" alt="License"></a> <a href="https://twitter.com/invertaseio"><img src="https://img.shields.io/twitter/follow/invertaseio.svg?style=social&label=Follow" alt="Follow on Twitter"></a> </p>

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


<p align="center"> <a href="https://invertase.io/?utm_source=readme&utm_medium=footer&utm_campaign=denque"> <img width="75px" src="https://static.invertase.io/assets/invertase/invertase-rounded-avatar.png"> </a> <p align="center"> Built and maintained by <a href="https://invertase.io/?utm_source=readme&utm_medium=footer&utm_campaign=denque">Invertase</a>. </p> </p>

Related Skills

View on GitHub
GitHub Stars374
CategoryData
Updated8d ago
Forks33

Languages

JavaScript

Security Score

95/100

Audited on Mar 24, 2026

No findings