NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4676 most downloaded on npm
Run multiple promise-returning & async functions with limited concurrency using native ES9
Last release 4 years ago
no release in 18 months
Release timing varies
gaps range from 8 days to 1.4 years
Some releases are documented
notes for 4 of 11 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
11 releases · first in 2018
Improve the promise consumption logic #44
⭐️ Enhancement
🐛 Fixes
Remove unused variables (apostolos) #35
One column per quarter.
Support for await...of usage by returning an async iterator.
🌟 New API (breaking change)
Support for await...of usage by returning an async iterator.
const timeout = ms => new Promise(resolve => setTimeout(() => resolve(ms), ms));
for await (const ms of asyncPool(2, [1000, 5000, 3000, 2000], timeout)) {
console.log(ms);
}
// Call iterator timeout(1000)
// Call iterator timeout(5000)
// Concurrency limit of 2 reached, wait for the quicker one to complete...
// 1000 finishes
// for await...of outputs "1000"
// Call iterator timeout(3000)
// Concurrency limit of 2 reached, wait for the quicker one to complete...
// 3000 finishes
// for await...of outputs "3000"
// Call iterator timeout(2000)
// Itaration is complete, wait until running ones complete...
// 5000 finishes
// for await...of outputs "5000"
// 2000 finishes
// for await...of outputs "2000"
The main difference: 1.x API waits until all of the promises completes, then all results are returned. The new API (thanks to async iteration) let each result be returned as soon as it completes.
The environment baseline of the new 2.x is ES9 (Node v10). The environment baseline of 1.x is ES6.
Support for any iterable, not just array
🎉 New Features
🐛 Fixes
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →