UNPKG

jet-validators

Version:

A list common typescript validator-functions and some useful utilities to go with them.

25 lines 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.orOptional = orOptional; exports.orNullable = orNullable; function orOptional(cb) { return (arg) => { if (arg === undefined) { return true; } else { return cb(arg); } }; } function orNullable(cb) { return (arg) => { if (arg === null) { return true; } else { return cb(arg); } }; } //# sourceMappingURL=common.js.map