wishthis/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js
2022-06-08 12:36:39 +02:00

22 lines
No EOL
695 B
JavaScript

"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