Projekt

Obecné

Profil

Stáhnout (401 Bajtů) Statistiky
| Větev: | Revize:
1 3a515b92 cagy
'use strict';
2
3
Object.defineProperty(exports, "__esModule", { value: true });
4
var isProduction = process.env.NODE_ENV === 'production';
5
var prefix = 'Invariant failed';
6
function 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
}
15
exports.default = invariant;