hugoWebsite/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js

22 lines
695 B
JavaScript
Raw Normal View History

2022-10-29 00:20:35 +02:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scheduleArray = void 0;
var Observable_1 = require("../Observable");
function scheduleArray(input, scheduler) {
return new Observable_1.Observable(function (subscriber) {
var i = 0;
return scheduler.schedule(function () {
if (i === input.length) {
subscriber.complete();
}
else {
subscriber.next(input[i++]);
if (!subscriber.closed) {
this.schedule();
}
}
});
});
}
exports.scheduleArray = scheduleArray;
//# sourceMappingURL=scheduleArray.js.map