mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-16 23:33:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
41
node_modules/rxjs/_esm2015/operators/skip.js
generated
vendored
Normal file
41
node_modules/rxjs/_esm2015/operators/skip.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Returns an Observable that skips the first `count` items emitted by the source Observable.
|
||||
*
|
||||
* <img src="./img/skip.png" width="100%">
|
||||
*
|
||||
* @param {Number} count - The number of times, items emitted by source Observable should be skipped.
|
||||
* @return {Observable} An Observable that skips values emitted by the source Observable.
|
||||
*
|
||||
* @method skip
|
||||
* @owner Observable
|
||||
*/
|
||||
export function skip(count) {
|
||||
return (source) => source.lift(new SkipOperator(count));
|
||||
}
|
||||
class SkipOperator {
|
||||
constructor(total) {
|
||||
this.total = total;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new SkipSubscriber(subscriber, this.total));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
class SkipSubscriber extends Subscriber {
|
||||
constructor(destination, total) {
|
||||
super(destination);
|
||||
this.total = total;
|
||||
this.count = 0;
|
||||
}
|
||||
_next(x) {
|
||||
if (++this.count > this.total) {
|
||||
this.destination.next(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=skip.js.map
|
||||
Reference in New Issue
Block a user