source: trip-planner-front/node_modules/rxjs/src/internal/observable/fromArray.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 423 bytes
RevLine 
[6a3a178]1import { Observable } from '../Observable';
2import { SchedulerLike } from '../types';
3import { subscribeToArray } from '../util/subscribeToArray';
4import { scheduleArray } from '../scheduled/scheduleArray';
5
6export function fromArray<T>(input: ArrayLike<T>, scheduler?: SchedulerLike) {
7 if (!scheduler) {
8 return new Observable<T>(subscribeToArray(input));
9 } else {
10 return scheduleArray(input, scheduler);
11 }
12}
Note: See TracBrowser for help on using the repository browser.