Buckets:
| import { MonoTypeOperatorFunction } from '../types'; | |
| import { filter } from './filter'; | |
| /** | |
| * Returns an Observable that skips the first `count` items emitted by the source Observable. | |
| * | |
| *  | |
| * | |
| * Skips the values until the sent notifications are equal or less than provided skip count. It raises | |
| * an error if skip count is equal or more than the actual number of emits and source raises an error. | |
| * | |
| * ## Example | |
| * | |
| * Skip the values before the emission | |
| * | |
| * ```ts | |
| * import { interval, skip } from 'rxjs'; | |
| * | |
| * // emit every half second | |
| * const source = interval(500); | |
| * // skip the first 10 emitted values | |
| * const result = source.pipe(skip(10)); | |
| * | |
| * result.subscribe(value => console.log(value)); | |
| * // output: 10...11...12...13... | |
| * ``` | |
| * | |
| * @see {@link last} | |
| * @see {@link skipWhile} | |
| * @see {@link skipUntil} | |
| * @see {@link skipLast} | |
| * | |
| * @param count The number of times, items emitted by source Observable should be skipped. | |
| * @return A function that returns an Observable that skips the first `count` | |
| * values emitted by the source Observable. | |
| */ | |
| export function skip<T>(count: number): MonoTypeOperatorFunction<T> { | |
| return filter((_, index) => count <= index); | |
| } | |
Xet Storage Details
- Size:
- 1.21 kB
- Xet hash:
- 593e35033eab509b258f2ec87fa85ac7ae4e59cf77a8f2f43ac39c1c37e110bc
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.