flyd-sampleon

1.0.3 • Public • Published

flyd-sampleon

sampleOn for Flyd.

Samples from the second stream every time an event occurs on the first stream.

Signature

Stream a -> Stream b -> Stream b

Usage

// Assume `sendBtnClicked` emits whenever a send button is pressed and
// `messageText` is a stream of the current content of an input field.
// Then `sendMessage` emits the content of the text field whenever the button
// is pressed.
var sendMessage = sampleOn(sendBtnClicked, messageText);

Dependents (1)

Package Sidebar

Install

npm i flyd-sampleon

Weekly Downloads

8

Version

1.0.3

License

MIT

Last publish

Collaborators

  • paldepind