@textlint/kernel
Version:
textlint kernel is core logic by pure JavaScript.
16 lines • 428 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.invariant = void 0;
/**
* Test if condition is truthy.
* @param {any} expression to be evaluated
* @param {string} error message to be shown
* @returns {void}
* @throws
*/
function invariant(condition, message) {
if (!condition)
throw new Error(message);
}
exports.invariant = invariant;
//# sourceMappingURL=invariant.js.map