Home

Awesome

flyd-debounceTime

Build Status

debounceTime implementation for flyd streams. Similar to flyd-aftersilence, but it only emits the last value received.

Usage

var stream$ = flyd.stream()
var debounce$ = debounceTime(500, stream$)

stream$(1)
assert.deepEqual(debounce$(), undefined)
stream$(2)
stream$(3)
assert.deepEqual(debounce$(), undefined)

setTimeout(function () {
  assert.deepEqual(debounce$(), 3)
  done()
}, 550)