1 |
3a515b92
|
cagy
|
(function (factory) {
|
2 |
|
|
typeof define === 'function' && define.amd ? define(factory) :
|
3 |
|
|
factory();
|
4 |
|
|
}((function () { 'use strict';
|
5 |
|
|
|
6 |
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7 |
|
|
var isProduction = process.env.NODE_ENV === 'production';
|
8 |
|
|
var prefix = 'Invariant failed';
|
9 |
|
|
function invariant(condition, message) {
|
10 |
|
|
if (condition) {
|
11 |
|
|
return;
|
12 |
|
|
}
|
13 |
|
|
if (isProduction) {
|
14 |
|
|
throw new Error(prefix);
|
15 |
|
|
}
|
16 |
|
|
throw new Error(prefix + ": " + (message || ''));
|
17 |
|
|
}
|
18 |
|
|
exports.default = invariant;
|
19 |
|
|
|
20 |
|
|
})));
|