Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
collapse-tasks-queue
Advanced tools
CTQueue
executes latest task defined by unique key ms
milliseconds after latest consume
call.
This library was created for firebase push notifications management (but you can use it for anything else, of course). In out case, client pushes button frequently; we need
to bound notifications, collapse them and send only latest one. For some reasons we can not do that on client side and
we can not use collapse_key
across all devices.
let { CTQueue } = require('collapse-tasks-queue');
let q = new CTQueue(100);
let x = 200,
y = 0,
z = 300,
w = 0;
q.consume('a', () => {
x = 500;
y = 100;
});
q.consume('b', () => {
z = 500;
w = 100;
});
q.consume('a', () => {
x = 550;
});
q.consume('b', () => {
z = 550;
});
/*
delay 100 ms
x === 550;
y === 0;
z === 550;
w === 0;
*/
FAQs
Collapse tasks queue
We found that collapse-tasks-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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.