UNPKG

373 BJavaScriptView Raw
1import { Observable } from "../../utilities/index.js";
2export function fromPromise(promise) {
3 return new Observable(function (observer) {
4 promise
5 .then(function (value) {
6 observer.next(value);
7 observer.complete();
8 })
9 .catch(observer.error.bind(observer));
10 });
11}
12//# sourceMappingURL=fromPromise.js.map
\No newline at end of file