af-conditionals
Version:
A library that provides tools for making decisions in your code
13 lines • 451 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.assert_conditional = exports.Conditional = void 0;
class Conditional {
}
exports.Conditional = Conditional;
function assert_conditional(value, c, assertMsg = 'You condition was not met.') {
if (!c.test(value)) {
throw new TypeError(`${value} ${assertMsg}`);
}
}
exports.assert_conditional = assert_conditional;
//# sourceMappingURL=conditional.js.map