hugoWebsite/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js
Jeremy Nusser 0ab675d92b Initial commit... 🎉🎉🎉
2022-10-28 17:20:35 -05:00

18 lines
No EOL
534 B
JavaScript

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