Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Andarist/callbag-buffer-time
👜 Callbag operator which buffers source values until provided time has passed.
https://github.com/Andarist/callbag-buffer-time
callbag callbags
Last synced: 3 months ago
JSON representation
👜 Callbag operator which buffers source values until provided time has passed.
- Host: GitHub
- URL: https://github.com/Andarist/callbag-buffer-time
- Owner: Andarist
- Created: 2018-07-16T21:07:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T08:23:28.000Z (over 6 years ago)
- Last Synced: 2024-10-20T06:22:58.658Z (3 months ago)
- Topics: callbag, callbags
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-callbags - buffer-time
README
# callbag-buffer-time
Callbag operator which buffers source values until provided time has passed.
## Example
```js
import bufferTime from 'callbag-buffer-time'
import forEach from 'callbag-for-each'
import fromEvent from 'callbag-from-event'
import map from 'callbag-map'
import pipe from 'callbag-pipe'const btn = document.getElementById('#release')
pipe(
fromEvent(document, 'click'),
map(() => Math.floor(Math.random() * 100))
bufferTime(5000),
forEach(values => {
console.log(values) // [86, 93, 57, 64] ...
})
)
```