synca
Usage
with Deno
import { concurrent } from "https://deno.land/x/synca/mod.ts";
const co = concurrent(4 /* concurrency */);
for (let i = 0; i < 100; i++) {
await co.run(async () => {
await fetch(`https://something/articles/${i}`);
});
}
await co.wait(); // remain works..
with Node.js & Browser
Install
npm install synca
import { concurrent } from "synca";
// Usage is as above :-)