skip.js.map 2.3 KB

1
  1. {"version":3,"file":"skip.js","sourceRoot":"","sources":["../../src/operators/skip.ts"],"names":[],"mappings":";;;;;;AACA,2BAA2B,eAAe,CAAC,CAAA;AAK3C;;;;;;;;;;GAUG;AACH,cAAwB,KAAa;IACnC,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,EAApC,CAAoC,CAAC;AACzE,CAAC;AAFe,YAAI,OAEnB,CAAA;AAED;IACE,sBAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IACjC,CAAC;IAED,2BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,CAAC;IACH,mBAAC;AAAD,CAAC,AAPD,IAOC;AAED;;;;GAIG;AACH;IAAgC,kCAAa;IAG3C,wBAAY,WAA0B,EAAU,KAAa;QAC3D,kBAAM,WAAW,CAAC,CAAC;QAD2B,UAAK,GAAL,KAAK,CAAQ;QAF7D,UAAK,GAAW,CAAC,CAAC;IAIlB,CAAC;IAES,8BAAK,GAAf,UAAgB,CAAI;QAClB,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAZD,CAAgC,uBAAU,GAYzC","sourcesContent":["import { Operator } from '../Operator';\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { TeardownLogic } from '../Subscription';\nimport { MonoTypeOperatorFunction } from '../interfaces';\n\n/**\n * Returns an Observable that skips the first `count` items emitted by the source Observable.\n *\n * <img src=\"./img/skip.png\" width=\"100%\">\n *\n * @param {Number} count - The number of times, items emitted by source Observable should be skipped.\n * @return {Observable} An Observable that skips values emitted by the source Observable.\n *\n * @method skip\n * @owner Observable\n */\nexport function skip<T>(count: number): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>) => source.lift(new SkipOperator(count));\n}\n\nclass SkipOperator<T> implements Operator<T, T> {\n constructor(private total: number) {\n }\n\n call(subscriber: Subscriber<T>, source: any): TeardownLogic {\n return source.subscribe(new SkipSubscriber(subscriber, this.total));\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SkipSubscriber<T> extends Subscriber<T> {\n count: number = 0;\n\n constructor(destination: Subscriber<T>, private total: number) {\n super(destination);\n }\n\n protected _next(x: T) {\n if (++this.count > this.total) {\n this.destination.next(x);\n }\n }\n}\n"]}