0.1.0 • Published 8 years ago
flyd-debouncetime v0.1.0
flyd-debounceTime
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)