rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
17 lines • 422 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fpValueOrNull = void 0;
/**
* @public
* Returns the value if the predicate is true, else null.
* @remarks
* See {@link fpValueOrNull}.
*/
function fpValueOrNull(predicate, value) {
if (predicate) {
return value;
}
return null;
}
exports.fpValueOrNull = fpValueOrNull;
//# sourceMappingURL=fp-value-or-null.js.map