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
353 stars 33 forks source link

fix: removeOne(-1) from the end #55

Open teidesu opened 1 month ago

teidesu commented 1 month ago

mcve

const b = new Denque([1, 2, 3, 4, 5, 6, 7, 8]);
console.log(b.removeOne(-1));
console.log(b.toArray());

expected result

8
[1, 2, 3, 4, 5, 6, 7]

actual result

8
[2, 3, 4, 5, 6, 7, undefined]
docs-page[bot] commented 1 month ago

To view this pull requests documentation preview, visit the following URL:

docs.page/invertase/denque~55

Documentation is deployed and generated using docs.page.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.