NewYour coding agent can read the release notes before it upgrades.Set up the MCP server โ
npm
npm, #4676 most downloaded on npm
Run multiple promise-returning & async functions with limited concurrency using native ES9
Latest stable
2.1.0
Last release 5 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
Drag across the ruler to compare, or tap a release to open it.
Improve the promise consumption logic #44
โญ๏ธ Enhancement
๐ Fixes
Remove unused variables (apostolos) #35
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.
Your coding agent can read these notes before it upgrades. Set up the MCP server โ
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
One column per quarter.