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-rate-clock
Advanced tools
SavePromise is a very small library that allows you to handle saving of data in a promise-like way. If you have json data you want to save and it is modified, saved and modified again (so you would save it again), you could probably have two save operations at the same time. This library allows you to handle this situation. You can save your data and if it is already saving, it waits for the first save to finish and then saves the data again. It also schudules only one save operation if you save your data multiple times in a short period of time, so you don't have to worry about saving your data too often.
npm install savepromise
import SavePromise from "savepromise";
const savePromise = SavePromise(() => {
// function that saves your data
});
//save using:
savePromise.save(data);
In the above example, the data is saved only once. If you are saving your data multiple times in a short period of time, the true power of this library comes to light. If you save your data multiple times, it is saved only once. If you save your data again, it is saved again after the first save is finished. So it will optimize your saving operations.
So if you have this code:
import SavePromise from "savepromise";
const savePromise = SavePromise(() => {
// function that saves your data
});
//save using:
savePromise.save(data);
// modify data
savePromise.save(data);
// modify data
savePromise.save(data);
// modify data
savePromise.save(data);
// modify data
savePromise.save(data);
there will only be two save operations.
FAQs
Rateclock provides a clock mechanism to work with api rate limits
The npm package request-rate-clock receives a total of 9 weekly downloads. As such, request-rate-clock popularity was classified as not popular.
We found that request-rate-clock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.