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.

subscribeToObservable.js 437B

1234567891011
  1. import { observable as Symbol_observable } from '../symbol/observable';
  2. export const subscribeToObservable = (obj) => (subscriber) => {
  3. const obs = obj[Symbol_observable]();
  4. if (typeof obs.subscribe !== 'function') {
  5. throw new TypeError('Provided object does not correctly implement Symbol.observable');
  6. }
  7. else {
  8. return obs.subscribe(subscriber);
  9. }
  10. };
  11. //# sourceMappingURL=subscribeToObservable.js.map