UNPKG

401 BJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", { value: true });
4var isProduction = process.env.NODE_ENV === 'production';
5var prefix = 'Invariant failed';
6function invariant(condition, message) {
7 if (condition) {
8 return;
9 }
10 if (isProduction) {
11 throw new Error(prefix);
12 }
13 throw new Error(prefix + ": " + (message || ''));
14}
15exports.default = invariant;