skip
signature: skip(the: Number): Observable
Example 1: Skipping values before emission
Example 2: Short hand for a specific filter use case
import { skip, filter } 'rxjs/operators';
const numArrayObs = from([1,2,3,4,5,6,7,8,9,10]);
// 3,4,5...
const skipObs = numArrayObs.pipe(skip(2))
// 3,4,5...
const filterObs = numArrayObs.pipe(
filter((val, index) => index > 1)
)
.subscribe(console.log);
//Same output!
- Filtering operator: take, first, skip
- André Staltz