Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
async-each-series-throttle
Advanced tools
Iterate through items in series but throttle iteratee execution
Iterate through items in series but throttle iteratee execution
import eachSeriesThrottle from 'async-each-series-throttle'
const items = [0, 1, 2, 3, 4]
// Number in ms to throttle calls to iteratee
const wait = 1000
// Called only once every ~1000ms at minimum
const iteratee = (item, cb) => {
// Do some async work and callback when done
//
// If this takes _more than_ 1000ms then iteratee will be called again
// immediately after cb is called.
//
// If this takes _less than_ 1000ms then iteratee will be called again after
// ~1000ms have elapsed since the last time it was called.
setTimeout(() => cb(null, item + 1), 500)
}
// Optional callback after everything is done
const callback = (err, results) => {
// All done, after ~4000ms or more
// results is [1, 2, 3, 4, 5]
}
eachSeriesThrottle(items, iteratee, wait, callback)
FAQs
Iterate through items in series but throttle iteratee execution
The npm package async-each-series-throttle receives a total of 2 weekly downloads. As such, async-each-series-throttle popularity was classified as not popular.
We found that async-each-series-throttle 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.