invariant.js 400 B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = invariant;
  6. function invariant(condition, message) {
  7. var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
  8. if (!booleanCondition) {
  9. throw new Error(message != null ? message : 'Unexpected invariant triggered.');
  10. }
  11. }