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.
depend-async
Advanced tools
A small library that define multiple promises to be resolved asynchronously but without to resolve everything at once with the ability to grab the data from the previous promise result.
A small library that define multiple promises to be resolved asynchronously but without to resolve everything at once with the ability to grab the data from the previous promise result.
"test": "vitest",
"test:ui": "vitest --ui",
"coverage": "vitest run --coverage",
"build": "yarn vite build --debug"
const resolve: Func<any> = (num: number, timeout?: number) => async (prev: any) => new Promise((resolve) => {
timeout ?
setTimeout(() => {
resolve(num);
}, timeout) :
resolve(num);
});
const __test__ = await ResolvePromises([
resolve(10), resolve(30), resolve(20),
resolve(10), resolve(30), resolve(20),
[
resolve(10), resolve(30), resolve(20),
resolve(10), resolve(30), resolve(20),
resolve(10), resolve(30), resolve(20),
(prev: any) => resolve(prev + 2)(prev + 2),
(prev: any) => resolve(prev - 2)(prev - 2),
]
]);
expect(__test__).toEqual([
10, 30, 20,
10, 30, 20,
10, 30, 20,
10, 30, 20,
10, 30, 20, 22, 20
]);
ES:
normal: 0.26kb
gzip: 0.20kb
CJS:
normal: 0.29kb
gzip: 0.24kb
UMD:
normal: 0.49kb
gzip: 0.34kb
FAQs
A small library that define multiple promises to be resolved asynchronously but without to resolve everything at once with the ability to grab the data from the previous promise result.
The npm package depend-async receives a total of 0 weekly downloads. As such, depend-async popularity was classified as not popular.
We found that depend-async 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.