takeUntil(otherStream)
will complete when another (terminating) stream emits a value
1234567891011121314const { rxObserver } = require('api/v0.3'); const { timer } = require('rxjs'); const { takeUntil } = require('rxjs/operators'); const source$ = timer(0, 100); const terminator$ = timer(550); source$.subscribe(rxObserver('source$')); terminator$.subscribe(rxObserver('terminator$')); source$.pipe( takeUntil(terminator$) ) .subscribe(rxObserver('takeUntil'));
⚠️ Execution time is limited to 1000ms