invertase / 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.
https://docs.page/invertase/denque
Apache License 2.0
354 stars 33 forks source link

feat: adds capacity option for circular buffers #27

Closed gillesdemey closed 3 years ago

gillesdemey commented 3 years ago

This PR adds the ability to pass an optional configuration object to the Denque constructor to allow a max capacity to be specified, essentially allowing it to operate as a circular buffer.

fixes #24

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.03%) to 99.419% when pulling d3e5d4f5d378ed0ece1500fa334698319953b373 on gillesdemey:feat/capacity into ebe332be31c04754e820c0118fdc5bdb8dd2d4e0 on invertase:master.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.02%) to 99.412% when pulling 823dfc216040e5f3379fec6743e59e974c5cfa15 on gillesdemey:feat/capacity into ebe332be31c04754e820c0118fdc5bdb8dd2d4e0 on invertase:master.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.02%) to 99.412% when pulling 823dfc216040e5f3379fec6743e59e974c5cfa15 on gillesdemey:feat/capacity into ebe332be31c04754e820c0118fdc5bdb8dd2d4e0 on invertase:master.

Salakar commented 3 years ago

Thank you for this. Ignoring partial CI failure, this is just TS not compatible with Node 0.10, will sort in another PR.

Merging, will get a release published tomorrow.