1 line
4 KiB
JSON
1 line
4 KiB
JSON
|
{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { empty } from '../observable/empty';\nexport function repeat(count = -1) {\n return source => {\n if (count === 0) {\n return empty();\n } else if (count < 0) {\n return source.lift(new RepeatOperator(-1, source));\n } else {\n return source.lift(new RepeatOperator(count - 1, source));\n }\n };\n}\nclass RepeatOperator {\n constructor(count, source) {\n this.count = count;\n this.source = source;\n }\n call(subscriber, source) {\n return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));\n }\n}\nclass RepeatSubscriber extends Subscriber {\n constructor(destination, count, source) {\n super(destination);\n this.count = count;\n this.source = source;\n }\n complete() {\n if (!this.isStopped) {\n const {\n source,\n count\n } = this;\n if (count === 0) {\n return super.complete();\n } else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n }\n}","map":{"version":3,"names":["Subscriber","empty","repeat","count","source","lift","RepeatOperator","constructor","call","subscriber","subscribe","RepeatSubscriber","destination","complete","isStopped","_unsubscribeAndRecycle"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/repeat.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { empty } from '../observable/empty';\nexport function repeat(count = -1) {\n return (source) => {\n if (count === 0) {\n return empty();\n }\n else if (count < 0) {\n return source.lift(new RepeatOperator(-1, source));\n }\n else {\n return source.lift(new RepeatOperator(count - 1, source));\n }\n };\n}\nclass RepeatOperator {\n constructor(count, source) {\n this.count = count;\n this.source = source;\n }\n call(subscriber, source) {\n return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));\n }\n}\nclass RepeatSubscriber extends Subscriber {\n constructor(destination, count, source) {\n super(destination);\n this.count = count;\n this.source = source;\n }\n complete() {\n if (!this.isStopped) {\n const { source, count } = this;\n if (count === 0) {\n return super.complete();\n }\n else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle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