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.
request-idle-callback
Advanced tools
For more information refer to Using requestIdleCallback
npm install request-idle-callback
var ric = require('request-idle-callback')
// Executes myNonEssentialWork duting idle time on each frame or fallbacks to using setTimeout to run at most 50ms per frame
ric.requestIdleCallback(myNonEssentialWork);
function myNonEssentialWork (deadline) {
while (deadline.timeRemaining() > 0)
doWorkIfNeeded();
}
deadline
is an object containing:
deadline.didTimeout
boolean indicating if it is still time to deadline.deadline.timeRemaining
function that returns remaining time.Removes callback from the queue or calls clearTimeout.
node tests.js
MIT
FAQs
Browser shim for window.requestIdleCallback
The npm package request-idle-callback receives a total of 172 weekly downloads. As such, request-idle-callback popularity was classified as not popular.
We found that request-idle-callback 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.