@typed/new-type
Version:
Types for validating constraints
12 lines • 383 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNewType = exports.unsafeCoerce = void 0;
exports.unsafeCoerce = (value) => value;
/**
* Validate a NewType
* @param predicate :: (a -> boolean)
* @param value :: a
* @returns :: boolean
*/
exports.isNewType = (refinement) => (value) => refinement(value);
//# sourceMappingURL=new-type.js.map