
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
object-throttle-skip
Advanced tools
Node module to throttle an incoming stream of objects by letting some of them pass through, and throwing away others.
Node module to throttle an incoming stream of objects by letting some of them pass through, and throwing away others.
Within a specific timeframe a maximum number of x objects will pass.
If you want to get a rough idea of what this module is for, look as this fiddle.
http://jsfiddle.net/5afahLdf/11/show
npm install object-throttle-skip
var Throttle = require('throttle');
var maxObjectCount = 30;
var maxObjectTimeFrameMs = 30000;
var t = new Throttle(maxObjectTimeFrameMs, maxObjectCount);
function incomingObject(obj) {
// if you want to know what the probability for the next object will be use
console.log(t.getProbability());
// decide fate whether this incoming object should be propagated further
return t.throttleObject(obj);
// as an alternative you can do
// if (t.throttle()) return obj;
}
FAQs
Node module to throttle an incoming stream of objects by letting some of them pass through, and throwing away others.
We found that object-throttle-skip 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.