Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@cloudflare/util-async
Advanced tools
Cloudflare Async Util
$ npm install cf-util-async
Running async functions in a series:
import http from 'cf-util-http';
import {series} from 'cf-util-async';
series([
cb => http.get('endpoint-1.json', null, cb), // If an error occurs, then the rest of the callbacks are not called.
cb => http.get('endpoint-2.json', null, cb)
], (err, results) => {
if (err) {
console.log(err.body); // > { errors: [{ message: 'Error!' }] }
} else {
console.log(res.body); // > [{ result: { id: 1, ... } }, { result: { id: 2, ... } }]
}
});
Running async functions in parallel:
import http from 'cf-util-http';
import {parallel} from 'cf-util-async';
parallel([
cb => http.get('endpoint-1.json', null, cb),
cb => http.get('endpoint-2.json', null, cb)
], (err, results) => {
if (err) {
console.log(err.body); // > { errors: [{ message: 'Error!' }] }
} else {
console.log(res.body); // > [{ result: { id: 1, ... } }, { result: { id: 2, ... } }]
}
});
FAQs
Cloudflare Async Util
The npm package @cloudflare/util-async receives a total of 725 weekly downloads. As such, @cloudflare/util-async popularity was classified as not popular.
We found that @cloudflare/util-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.