Add bufferWithTimeout() and bufferWithInterval().
See original GitHub issueHighland uses setTimeout()
and Kefir uses setInterval()
for the batch/buffer with time (illustrated below). It would be nice to have both functions in Kefir, with a distinctive name.
Using highlandStream.batchWithTimeOrCount(100 /*ms/*, Infinity)
:
[ 0, 0, 0 ]
[ 150, 200, 250 ]
[ 300, 350, 400 ]
Using kefirStream.bufferWithTimeOrCount(100 /*ms*/, Infinity)
:
[ 0, 0, 0 ]
[ 150 ]
[ 200, 250 ]
[ 300, 350 ]
[ 400 ]
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Issues · kefirjs/kefir - GitHub
Add documentation to "Kefir.pool" as "Rx.Subject equivalent". #306 opened on Jul 31, ... Add bufferWithTimeout() and bufferWithInterval(). enhancement.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, if we subscribe to the same stream twice here is how it can be done:
Yea, I just not 100% sure about Flow/TypeScript, but I’ll merge the PR if you create one.