Learn RxJS
Search…
skipUntil

signature: skipUntil(the: Observable): Observable

Skip emitted values from source until provided observable emits.

Examples

Example 1: Skip until observable emits
1
// RxJS v6+
2
import { interval, timer } from 'rxjs';
3
import { skipUntil } from 'rxjs/operators';
4
5
//emit every 1s
6
const source = interval(1000);
7
//skip emitted values from source until inner observable emits (6s)
8
const example = source.pipe(skipUntil(timer(6000)));
9
//output: 5...6...7...8........
10
const subscribe = example.subscribe(val => console.log(val));
Copied!

Additional Resources

Last modified 1yr ago