callbag-switch-map 👜
A callbag operator that creates and switches to the new source whenever original source emits
npm install callbag-switch-map
Usage:
Pullable Source
const pipe = ;const switchMap = ;const fromIter = ;const forEach = ; console;; // Pullable source// h10// i10// i20// i30
Listenable Source
const pipe = ;const switchMap = ;const interval = ;const forEach = ;const fromPromise = ; const fakeAjax = { let period = value % 2 ? 400 : 1200; // Resolve odd numbers quickly ;}; console;; // Listenable source// 1// 9// 25// 49// 81// 121// ....