fp-ts-std
Version:
The missing pseudo-standard library for fp-ts.
18 lines (17 loc) • 930 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.asksTaskEither = exports.asksTask = exports.asksEither = exports.unsafeUnwrapLeft = exports.unsafeUnwrap = exports.runReaderTaskEither = void 0;
const TE = require("fp-ts/TaskEither");
const function_1 = require("fp-ts/function");
const Reader_1 = require("./Reader");
const TaskEither_1 = require("./TaskEither");
exports.runReaderTaskEither = Reader_1.runReader;
const unsafeUnwrap = (rte) => (r) => (0, TaskEither_1.unsafeUnwrap)(rte(r));
exports.unsafeUnwrap = unsafeUnwrap;
const unsafeUnwrapLeft = (rte) => (r) => (0, TaskEither_1.unsafeUnwrapLeft)(rte(r));
exports.unsafeUnwrapLeft = unsafeUnwrapLeft;
const asksEither = (f) => (0, function_1.flow)(f, TE.fromEither);
exports.asksEither = asksEither;
const asksTask = (f) => (0, function_1.flow)(f, TE.fromTask);
exports.asksTask = asksTask;
exports.asksTaskEither = function_1.identity;
;