PATH:
usr
/
local
/
lib
/
node_modules
/
ghost-cli
/
node_modules
/
rxjs
/
_esm2015
/
internal
/
util
import { subscribeToArray } from './subscribeToArray'; import { subscribeToPromise } from './subscribeToPromise'; import { subscribeToIterable } from './subscribeToIterable'; import { subscribeToObservable } from './subscribeToObservable'; import { isArrayLike } from './isArrayLike'; import { isPromise } from './isPromise'; import { isObject } from './isObject'; import { iterator as Symbol_iterator } from '../symbol/iterator'; import { observable as Symbol_observable } from '../symbol/observable'; export const subscribeTo = (result) => { if (!!result && typeof result[Symbol_observable] === 'function') { return subscribeToObservable(result); } else if (isArrayLike(result)) { return subscribeToArray(result); } else if (isPromise(result)) { return subscribeToPromise(result); } else if (!!result && typeof result[Symbol_iterator] === 'function') { return subscribeToIterable(result); } else { const value = isObject(result) ? 'an invalid object' : `'${result}'`; const msg = `You provided ${value} where a stream was expected.` + ' You can provide an Observable, Promise, Array, or Iterable.'; throw new TypeError(msg); } }; //# sourceMappingURL=subscribeTo.js.map
[-] subscribeToIterable.js
[edit]
[-] toSubscriber.js.map
[edit]
[-] EmptyError.js.map
[edit]
[-] subscribeToArray.js
[edit]
[-] TimeoutError.js.map
[edit]
[-] isArray.js.map
[edit]
[-] noop.js
[edit]
[-] isScheduler.js.map
[edit]
[-] ObjectUnsubscribedError.js
[edit]
[-] pipe.js.map
[edit]
[-] subscribeToIterable.js.map
[edit]
[-] root.js
[edit]
[-] applyMixins.js
[edit]
[-] isObject.js.map
[edit]
[-] subscribeToPromise.js
[edit]
[+]
..
[-] UnsubscriptionError.js
[edit]
[-] EmptyError.js
[edit]
[-] noop.js.map
[edit]
[-] subscribeToObservable.js
[edit]
[-] isPromise.js.map
[edit]
[-] isScheduler.js
[edit]
[-] isArrayLike.js
[edit]
[-] not.js.map
[edit]
[-] isObject.js
[edit]
[-] isNumeric.js
[edit]
[-] isObservable.js.map
[edit]
[-] ObjectUnsubscribedError.js.map
[edit]
[-] isIterable.js
[edit]
[-] isDate.js
[edit]
[-] applyMixins.js.map
[edit]
[-] not.js
[edit]
[-] isInteropObservable.js.map
[edit]
[-] isArrayLike.js.map
[edit]
[-] isIterable.js.map
[edit]
[-] isInteropObservable.js
[edit]
[-] pipe.js
[edit]
[-] hostReportError.js
[edit]
[-] ArgumentOutOfRangeError.js.map
[edit]
[-] TimeoutError.js
[edit]
[-] root.js.map
[edit]
[-] tryCatch.js
[edit]
[-] canReportError.js.map
[edit]
[-] subscribeToResult.js
[edit]
[-] toSubscriber.js
[edit]
[-] canReportError.js
[edit]
[-] errorObject.js.map
[edit]
[-] UnsubscriptionError.js.map
[edit]
[-] isFunction.js.map
[edit]
[-] ArgumentOutOfRangeError.js
[edit]
[-] subscribeToObservable.js.map
[edit]
[-] tryCatch.js.map
[edit]
[-] hostReportError.js.map
[edit]
[-] subscribeTo.js.map
[edit]
[-] identity.js
[edit]
[-] isArray.js
[edit]
[-] isPromise.js
[edit]
[-] isObservable.js
[edit]
[-] isDate.js.map
[edit]
[-] Immediate.js.map
[edit]
[-] errorObject.js
[edit]
[-] subscribeToPromise.js.map
[edit]
[-] subscribeTo.js
[edit]
[-] identity.js.map
[edit]
[-] subscribeToArray.js.map
[edit]
[-] isFunction.js
[edit]
[-] Immediate.js
[edit]
[-] isNumeric.js.map
[edit]
[-] subscribeToResult.js.map
[edit]