Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Latest commit

 

History

History
21 lines (17 loc) · 621 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 621 Bytes

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)