mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 17:51:07 +03:30
11 lines
437 B
JavaScript
Vendored
11 lines
437 B
JavaScript
Vendored
import { observable as Symbol_observable } from '../symbol/observable';
|
|
export const subscribeToObservable = (obj) => (subscriber) => {
|
|
const obs = obj[Symbol_observable]();
|
|
if (typeof obs.subscribe !== 'function') {
|
|
throw new TypeError('Provided object does not correctly implement Symbol.observable');
|
|
}
|
|
else {
|
|
return obs.subscribe(subscriber);
|
|
}
|
|
};
|
|
//# sourceMappingURL=subscribeToObservable.js.map
|