
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
All of the implementations of queues I found attached everything to the
prototype and didn't make good of private encapsulation, getters,
non-enumerable methods, etc.
This queue does not use Array#shift internally, so it keeps O(1) rather than O(n).
So here it is, a clean implementation of a queue written in straight simple es5.
var createQueue = require('daqueue');
var queue = createQueue(); // => Creates an empty queue
var queue = createQueue('hat', 'tree', 'golf'); // => Creates a queue with initial values
The size property works exactly the same as length on Array.
var queue = createQueue(1, 2, 3);
queue.size // => 3
A property containing the first item in the queue.
var queue = createQueue('hat', 'tree', 'golf');
queue.first // => 'hat'
Add a new item to the queue. Returns the queue for chaining.
var queue = createQueue();
queue.enqueue('hat');
queue.enqueue('tree').enqueue('house');
// queue is => ['hat', 'tree', 'house']
Gets the next item in the queue.
var queue = createQueue('hat', 'tree', 'golf');
queue.dequeue() // => 'hat'
// queue is => ['tree', 'golf']
Get the current queue as a string.
var queue = createQueue(1, 2, 3);
queue.toString() // => "1,2,3"
Copy the current queue into a regular array.
var queue = createQueue(1, 2, 3);
queue.toArray() // => [1, 2, 3]
FAQs
A queue written in clean es5
The npm package daqueue receives a total of 4 weekly downloads. As such, daqueue popularity was classified as not popular.
We found that daqueue 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.