Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/retraigo/nequeue
A "queue" with various operations.
https://github.com/retraigo/nequeue
Last synced: 8 days ago
JSON representation
A "queue" with various operations.
- Host: GitHub
- URL: https://github.com/retraigo/nequeue
- Owner: retraigo
- License: mit
- Created: 2022-07-29T12:15:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-29T13:32:36.000Z (over 2 years ago)
- Last Synced: 2024-10-11T20:57:31.899Z (about 1 month ago)
- Language: TypeScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nequeue
A queue-like wrapper around the JavaScript `array`.## Properties And methods
- `size` (size of the queue)Supports the following default Array methods:
- `at()` (now warps on either side of the queue, also removes the item from the array)
- `every()`
- `some()`
- `find()` (also removes the item from the queue)
- `filter()`
- `map()`
- `sort()`
- `pop()` (actually implements `shift()` rn. Use `at(-1)` for the original `pop()`)Newer methods:
- `add()` (akin to `Array#push`)
- `array()` (read-only access to the private `#data` field)
- `kick()` (get the first element and move it to the last)
- `shuffle()` (sorts the queue in a random order)## License
MIT as always.## Support
[https://discord.gg/A69vvdK]