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.

scheduled.js 1.1KB

1234567891011121314151617181920212223242526
  1. import { scheduleObservable } from './scheduleObservable';
  2. import { schedulePromise } from './schedulePromise';
  3. import { scheduleArray } from './scheduleArray';
  4. import { scheduleIterable } from './scheduleIterable';
  5. import { isInteropObservable } from '../util/isInteropObservable';
  6. import { isPromise } from '../util/isPromise';
  7. import { isArrayLike } from '../util/isArrayLike';
  8. import { isIterable } from '../util/isIterable';
  9. export function scheduled(input, scheduler) {
  10. if (input != null) {
  11. if (isInteropObservable(input)) {
  12. return scheduleObservable(input, scheduler);
  13. }
  14. else if (isPromise(input)) {
  15. return schedulePromise(input, scheduler);
  16. }
  17. else if (isArrayLike(input)) {
  18. return scheduleArray(input, scheduler);
  19. }
  20. else if (isIterable(input) || typeof input === 'string') {
  21. return scheduleIterable(input, scheduler);
  22. }
  23. }
  24. throw new TypeError((input !== null && typeof input || input) + ' is not observable');
  25. }
  26. //# sourceMappingURL=scheduled.js.map