Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

denque

Package Overview
Dependencies
0
Maintainers
1
Versions
24
Issues
File Explorer

Advanced tools

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.

    2.1.0latest
    Github

Version published
Maintainers
1
Weekly downloads
7,500,085
increased by8.65%

Weekly downloads

Changelog

Source

2.1.0

  • fix: issue where clear() is still keeping references to the elements (#47)
  • refactor: performance optimizations for growth and array copy (#43)
  • refactor: performance optimizations for toArray and fromArray (#46)
  • test: add additional benchmarks for queue growth and toArray (#45)

Readme

Source

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.

Keywords

FAQs

What is 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.

Is denque popular?

The npm package denque receives a total of 7,160,227 weekly downloads. As such, denque popularity was classified as popular.

Is denque well maintained?

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.

Last updated on 18 Jul 2022

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.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc