tallbag-share
Tallbag operator that broadcasts a single source to multiple sinks. Does reference counting on sinks and starts the source when the first sink gets connected, similar to RxJS .share()
. Works on either pullable or listenable sources.
npm install tallbag-share
example
Share a listenable source to two listeners:
const interval = ;const observe = ;const share = ; const source = ; source; // 0 // 1 // 2 // 3 // ... ;
Share a pullable source to two pullers:
const fromIter = ;const share = ; const source = ; let talkback;; ; ; // a10 // b10; // a20 // b20