In RxJS we have the sample
operator that, according to the docs:
Emits the most recently emitted value from the source Observable whenever another Observable, the notifier, emits.
I want something similar, but with the values emmited after the notifier emits.
With sample:
Stream: -a---b-c---d--
Notifier: ---x-----x----
Result: -a-----c------
With what I want:
Stream: -a---b-c---d--
Notifier: ---x-----x----
Result: -----b-----d--
Is there an operator or combination of operators that does this?
Notifier.switch(() => Stream.take(1))
– Yury Tarabanko