GoScrobble/web/node_modules/tiny-invariant/dist/tiny-invariant.js

21 lines
551 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
}((function () { 'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
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 || ''));
}
exports.default = invariant;
})));