GoScrobble/web/node_modules/tiny-warning/dist/tiny-warning.cjs.js

23 lines
378 B
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
'use strict';
var isProduction = process.env.NODE_ENV === 'production';
function warning(condition, message) {
if (!isProduction) {
if (condition) {
return;
}
var text = "Warning: " + message;
if (typeof console !== 'undefined') {
console.warn(text);
}
try {
throw Error(text);
} catch (x) {}
}
}
module.exports = warning;