Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

scheduleArray.js 626B

1234567891011121314151617181920
  1. import { Observable } from '../Observable';
  2. import { Subscription } from '../Subscription';
  3. export function scheduleArray(input, scheduler) {
  4. return new Observable(subscriber => {
  5. const sub = new Subscription();
  6. let i = 0;
  7. sub.add(scheduler.schedule(function () {
  8. if (i === input.length) {
  9. subscriber.complete();
  10. return;
  11. }
  12. subscriber.next(input[i++]);
  13. if (!subscriber.closed) {
  14. sub.add(this.schedule());
  15. }
  16. }));
  17. return sub;
  18. });
  19. }
  20. //# sourceMappingURL=scheduleArray.js.map