frontend/.pnpm-store/v3/files/53/e184dd1534d0bfe19a6c567ccd5491d2fb3e88e6eff92d3b6e7e4ebc2729d86c7ffa7a16acf96284e136bb28cb2e56946c78c96c2156965ede9ba5a233b5c2

32 lines
1.0 KiB
Plaintext

/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { Subscriber } from '../Subscriber';
export function skip(count) {
return function (source) { return source.lift(new SkipOperator(count)); };
}
var SkipOperator = /*@__PURE__*/ (function () {
function SkipOperator(total) {
this.total = total;
}
SkipOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new SkipSubscriber(subscriber, this.total));
};
return SkipOperator;
}());
var SkipSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(SkipSubscriber, _super);
function SkipSubscriber(destination, total) {
var _this = _super.call(this, destination) || this;
_this.total = total;
_this.count = 0;
return _this;
}
SkipSubscriber.prototype._next = function (x) {
if (++this.count > this.total) {
this.destination.next(x);
}
};
return SkipSubscriber;
}(Subscriber));
//# sourceMappingURL=skip.js.map