
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
buffer-async-iterator
Advanced tools
Buffer an AsyncIterator before iteration.
Create an AsyncIterator over the values of an AsyncIterator, eagerly iterated.
$ yarn buffer-async-iterator
Create an AsyncIterator from iterable, with the values eagerly buffered.
Parameters
iterable (AsyncIterable<Value> | Iterable<Value>) The iterable whose values will be buffered.write Write A function that takes iterable and buffer and returns a Promise. buffer will not be iterated through until it resolves. (optional, default defaultWrite)buffer (AsyncIterable<Value> | Iterable<Value>) An iterable representing the data being buffered. (optional, default [])Examples
import bufferAsyncIterator from 'bufferAsyncIterator';
import got from 'got';
async function* getWebsites(sites) {
for (const site of sites) {
yield await got(site);
}
}
// Immediate start running the generator.
const websiteIterator = bufferAsyncIterator(getWebsites(['google.com', 'bing.com', 'is-yahoo-still-around.com']));
for await (const site of websiteIterator) {
// Iteration begins only after the original generator has finished.
}
MIT © Matthew Fernando Garcia
FAQs
Buffer an AsyncIterator before iteration.
We found that buffer-async-iterator 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.