callbag-latest-batch
1.0.1 • Public • Published callbag-latest-batch
Callbag operator that turns a listenable source into a pullable source, emiting all the data since the last request batched within an array, if any.
Much like callbag-latest but one that collects all the interim data.
example
const interval = require('callbag-interval')
const sample = require('callbag-sample')
const pipe = require('callbag-pipe')
const latestBatch = require('callbag-latest-batch')
const randomStream = pipe(
interval(1000),
map(() => Math.floor(Math.random()*100))
)
const submitActionStream = pipe(
interval(5000),
sample(latestBatch(randomStream))
)
/callbag-latest-batch/
//
Package Sidebar
Install
npm i callbag-latest-batch
Weekly Downloads