@brizy/ui
Version:
React elements in Brizy style
16 lines (15 loc) • 548 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromString = exports.isNullish = void 0;
exports.mApply = mApply;
const index_1 = require("../index");
const Hex_1 = require("../../types/Hex");
const isNullish = (v) => v === undefined || v === null || (typeof v === "number" && Number.isNaN(v));
exports.isNullish = isNullish;
function mApply(f, v) {
if ((0, exports.isNullish)(v)) {
return undefined;
}
return f(v);
}
exports.fromString = (0, index_1.mPipe)((0, index_1.pass)(Hex_1.isHex));