
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Efficient fifo queue for handling large amounts of data in O(1)
This module was created because most other queue modules in javascript either use simple arrays or doubly linked lists.
Both have drawbacks: Large arrays are terribly inefficient when removing the first element and linked lists are not very efficent storage-wise.
import Queue from 'std-queue';
const queue = new Queue();
queue.push(1);
queue.push(2);
for (let i = 10; i < 10000; i++) {
queue.push(i);
}
queue.push('Hello', 'World');
queue.peek(); // 1
queue.last(); // 'World';
queue.shift(); // 1, head is now at 2
queue.length; // 9993
queue.clear(); // Empties queue
queue.shift(); // undefined
The underlying implementation is a simple linked list of subqueues (delayed shift arrays) of maximum size 1000 each.
The only operations performed are:
Each of those operations are O(1), there is never any array resizing. The use of arrays instead of just linked lists allow to be faster and use less RAM than linked lists.
If you have contributions or feature requests, open a pull request or create a new issue. I will glady add basic features if they are needed.
FAQs
Efficient fifo queue for handling large amounts of data in O(1)
The npm package std-queue receives a total of 31 weekly downloads. As such, std-queue popularity was classified as not popular.
We found that std-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.