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.
@merry-solutions/debounce
Advanced tools
Simple debounce factory function that creates an async version of a passed function which executes after a given delay. Built with typescript and promises.
Simple debounce factory function that creates an async version of a passed function which executes after a given delay. Built with typescript and promises.
npm i @merry-solutions/debounce
Simply create a debounced version of any function. Passing a function you get back a tuple consisting of a debounced version of the passed function and an additional function that can cancel the debounced version's pending execution at any time.
Running debounced function:
import { debounce } from '@merry-solutions/debounce';
function saySomething(): void {
console.log('Something');
}
const [debouncedSaySomething] = debounce(saySomething, 100);
// Is going to say something only once
for (let x = 0; x < 99; x++) {
debouncedSaySomething();
}
Cancelling debounced function before execution:
import { debounce } from '@merry-solutions/debounce';
function saySomething(): void {
console.log('Something');
}
const [debouncedSaySomething, cancel] = debounce(saySomething, 100);
// Won't say anything
for (let x = 0; x < 99; x++) {
debouncedSaySomething();
}
cancel();
Simple as that :)
FAQs
Simple debounce factory function that creates an async version of a passed function which executes after a given delay. Built with typescript and promises.
The npm package @merry-solutions/debounce receives a total of 0 weekly downloads. As such, @merry-solutions/debounce popularity was classified as not popular.
We found that @merry-solutions/debounce 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.