mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
23 lines
378 B
JavaScript
23 lines
378 B
JavaScript
'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;
|