Skip to content

👜 Callbag operator which buffers source values until provided time has passed.

Notifications You must be signed in to change notification settings

Andarist/callbag-buffer-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

callbag-buffer-time

Callbag operator which buffers source values until provided time has passed.

Example

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] ...
  })
)

About

👜 Callbag operator which buffers source values until provided time has passed.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published