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

18 lines
No EOL
540 B
JavaScript

import { Observable } from '../Observable';
export function scheduleArray(input, scheduler) {
return new 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();
}
}
});
});
}
//# sourceMappingURL=scheduleArray.js.map