Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
626 bytes
|
Line | |
---|
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 |
---|
Note:
See
TracBrowser
for help on using the repository browser.