
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
limitedQueue
Advanced tools
An npm package which has a queue and a load balancing queue system.
$ npm install limitedQueue
const q = require('limitedQueue');
let limited = new q.LimitedQueue(5);
for (var i = 0; i < 10; i ++) {
limited.enqueue(i);
}
limited.size();
=> 5
limited.toArray();
=> [ 5, 6, 7, 8, 9 ]
limited.dequeue();
=> 5
const q = require('limitedQueue');
let limited = new q.LimitedQueue(5);
let enqueueHook = limited.on('enqueue', () => {console.log('ok')});
for (var i = 0; i < 10; i ++) {
limited.enqueue(i);
=> logs OK 10 times
};
limited.off('enqueue', enqueueHook);
//Enqueueing will no longer console log.
limited.size();
=> 5
limited.toArray();
=> [ 5, 6, 7, 8, 9 ]
limited.dequeue();
=> 5
limited.squelch(100); //Bytes of Storage space not including space of object
limited.dequeueInterval(100, console.log);
//Will log an item from the queue every 100 ms and remove it from the queue
const q = require('limitedQueue');
let arr = [];
let auto = new q.AutoQueue(3, arr.push);
auto.changeLimit(5);
//New limit of 5 items
auto.enqueue(1, 2, 3, 4);
auto.dequeueAll(function Callback(item, done) => {
setTimeout(() => {
arr.push(item);
if (item !== 3) {
done();
} else {
done(true);
}
}, 1000);
});
//After approx. 3000 seconds, the array will have [ 1, 2, 3 ], and autoQueue will
//have 4.
auto.onLimit(/* callback function */);
//Sets the default callback to use when dequeueAll is called.
FAQs
A queue which limits space and storage size
The npm package limitedQueue receives a total of 0 weekly downloads. As such, limitedQueue popularity was classified as not popular.
We found that limitedQueue 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.