Package Exports
- it-batch
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (it-batch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
it-batch
Takes an async iterator that emits things and emits them as fixed-size batches
The final batch may be smaller than the max.
Install
$ npm install --save it-batchUsage
const batch = require('it-batch')
const all = require('it-all')
// This can also be an iterator, async iterator, generator, etc
const values = [0, 1, 2, 3, 4]
const batchSize = 2
const result = await all(batch(values, batchSize))
console.info(result) // [0, 1], [2, 3], [4]