async-batcher
v1.0.2
Published
Batch calls to an async function.
Downloads
8
Readme
async-batcher
Batch calls to an async function.
const Batcher = require('async-batcher')
const batcher = new Batcher(vals => vals.map(x => x + 1))
const twoThree = await Promise.all([
batcher(1),
batcher(2)
])
console.log(...twoThree, batcher.callCount) // 2 3 1