2019-06-04 14:29:48 +02:00
|
|
|
/** PURE_IMPORTS_START _Observable,_util_subscribeToIterable,_scheduled_scheduleIterable PURE_IMPORTS_END */
|
2018-11-22 16:41:46 +01:00
|
|
|
import { Observable } from '../Observable';
|
|
|
|
import { subscribeToIterable } from '../util/subscribeToIterable';
|
2019-06-04 14:29:48 +02:00
|
|
|
import { scheduleIterable } from '../scheduled/scheduleIterable';
|
2018-11-22 16:41:46 +01:00
|
|
|
export function fromIterable(input, scheduler) {
|
|
|
|
if (!input) {
|
|
|
|
throw new Error('Iterable cannot be null');
|
|
|
|
}
|
|
|
|
if (!scheduler) {
|
|
|
|
return new Observable(subscribeToIterable(input));
|
|
|
|
}
|
|
|
|
else {
|
2019-06-04 14:29:48 +02:00
|
|
|
return scheduleIterable(input, scheduler);
|
2018-11-22 16:41:46 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//# sourceMappingURL=fromIterable.js.map
|