1.0.2 • Published 5 years ago

async-batcher v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

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
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago