@tinymce/beehive-flow
Version:
A CLI tool implementing the beehive flow git branching process
18 lines • 728 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.somes = exports.mapAsync = exports.eachAsync = void 0;
const tslib_1 = require("tslib");
const Arr = tslib_1.__importStar(require("fp-ts/Array"));
const function_1 = require("fp-ts/function");
const O = tslib_1.__importStar(require("fp-ts/Option"));
const eachAsync = async (o, f) => {
if (O.isSome(o)) {
return f(o.value);
}
};
exports.eachAsync = eachAsync;
const mapAsync = async (o, f) => O.isSome(o) ? O.some(await f(o.value)) : O.none;
exports.mapAsync = mapAsync;
const somes = (options) => (0, function_1.pipe)(options, Arr.filterMap(function_1.identity));
exports.somes = somes;
//# sourceMappingURL=OptionUtils.js.map