mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-24 22:39:26 +01:00
14 lines
321 B
JavaScript
Vendored
14 lines
321 B
JavaScript
Vendored
var isProduction = process.env.NODE_ENV === 'production';
|
|
var prefix = 'Invariant failed';
|
|
function invariant(condition, message) {
|
|
if (condition) {
|
|
return;
|
|
}
|
|
if (isProduction) {
|
|
throw new Error(prefix);
|
|
}
|
|
throw new Error(prefix + ": " + (message || ''));
|
|
}
|
|
|
|
export default invariant;
|