froebel
Version:
TypeScript utility library
16 lines (12 loc) • 357 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.assert = void 0;
const assert = (condition, message, type = Error) => {
if (!(typeof condition === "function" ? condition() : condition)) {
throw new type(message);
}
};
exports.assert = assert;
module.exports = Object.assign(exports.default || {}, exports);