averykimball / flyd-aftersilence

Flyd module that buffers values from a stream and emits them after a specified duration of silience.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flyd-aftersilence

Buffers values from a source stream in an array and emits it after a specified duration of silence from the source stream.

Signature

Stream a -> Stream b

Example

afterSilence(function(values) {
  console.log('You achieved a combo of ' + values.length + '!');
}, afterSilence(1000, birdsShot);
afterSilence(function(values) {
  console.log('You typed: "' + values.join('') + '" without any pauses');
}, afterSilence(300, characterTyped);

About

Flyd module that buffers values from a stream and emits them after a specified duration of silience.

License:MIT License


Languages

Language:JavaScript 100.0%