NET-Web-API-w-Angular/my-app/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js

18 lines
534 B
JavaScript
Raw Normal View History

2024-02-09 00:38:41 +00:00
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