github-pages-deploy-action/node_modules/graphql/jsutils/invariant.js

16 lines
405 B
JavaScript
Raw Normal View History

2020-03-07 11:45:40 +08:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = invariant;
function invariant(condition, message) {
var booleanCondition = Boolean(condition);
/* istanbul ignore else (see transformation done in './resources/inlineInvariant.js') */
if (!booleanCondition) {
throw new Error(message != null ? message : 'Unexpected invariant triggered.');
}
}