diff options
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/rxjs/internal/observable/range.js')
-rw-r--r-- | sandbox/testAppNevena/Front/node_modules/rxjs/internal/observable/range.js | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/rxjs/internal/observable/range.js b/sandbox/testAppNevena/Front/node_modules/rxjs/internal/observable/range.js new file mode 100644 index 00000000..8e5c0df9 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/rxjs/internal/observable/range.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Observable_1 = require("../Observable"); +function range(start, count, scheduler) { + if (start === void 0) { start = 0; } + return new Observable_1.Observable(function (subscriber) { + if (count === undefined) { + count = start; + start = 0; + } + var index = 0; + var current = start; + if (scheduler) { + return scheduler.schedule(dispatch, 0, { + index: index, count: count, start: start, subscriber: subscriber + }); + } + else { + do { + if (index++ >= count) { + subscriber.complete(); + break; + } + subscriber.next(current++); + if (subscriber.closed) { + break; + } + } while (true); + } + return undefined; + }); +} +exports.range = range; +function dispatch(state) { + var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber; + if (index >= count) { + subscriber.complete(); + return; + } + subscriber.next(start); + if (subscriber.closed) { + return; + } + state.index = index + 1; + state.start = start + 1; + this.schedule(state); +} +exports.dispatch = dispatch; +//# sourceMappingURL=range.js.map
\ No newline at end of file |