UNPKG

@frauschert/ts-guard

Version:

ts-guard is a typescript library that provides composable type guards. Its inspired by zod but focusses only on type guards and is more lightweight.

7 lines 322 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isOptional = void 0; const isUndefined_1 = require("../isUndefined/isUndefined"); const isOptional = (guard) => (x) => (0, isUndefined_1.isUndefined)(x) || guard(x); exports.isOptional = isOptional; //# sourceMappingURL=isOptional.js.map