Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 371 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 371 Bytes

flyd-switchlatest

Flattens a stream of streams. The result stream reflects changes from the last stream only.

Signature

Stream (Stream a) -> Stream b

Usage

var chatrooms = flyd.stream();
var messagesStreams = flyd.map(function(id) {
  return createMessageStream(id);
}, chatrooms);
var currentMessages = switchLatest(messagesStreams);