@ninepie/batch-outputer
v0.0.2
Published
## How to use
Downloads
3
Readme
batch-outputer
How to use
bun add @ninepie/batch-outputer
import { BatchOutputer } from '@ninepie/batch-outputer'
const outputer = new BatchOutputer<number[]>({
outputer: (data) {
console.log(data)
},
batchSize: 5,
maxWaitTime: 1_000 /* ms */
})
outputer.insert(1)
outputer.insert(2)
// console.log(1)
// console.log(2)