UNPKG

wonka

Version:

A fast push & pull stream library for Reason, loosely following the [callbag spec](https://github.com/callbag/callbag)

25 lines (19 loc) 785 B
import * as Curry from "bs-platform/lib/es6/curry.js"; import * as Wonka_operator_takeLast from "../operators/wonka_operator_takeLast.js"; function toPromise(source) { return new Promise((function (resolve, param) { return Curry._1(Wonka_operator_takeLast.takeLast(1)(source), (function (signal) { if (typeof signal === "number") { return /* () */0; } else if (signal.tag) { return resolve(signal[0]); } else { return signal[0](/* Pull */0); } })); })); } export { toPromise , } /* No side effect */