mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
28 lines
595 B
JavaScript
28 lines
595 B
JavaScript
|
(function (global, factory) {
|
||
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||
|
typeof define === 'function' && define.amd ? define(factory) :
|
||
|
(global = global || self, global.warning = factory());
|
||
|
}(this, function () { 'use strict';
|
||
|
|
||
|
function warning(condition, message) {
|
||
|
{
|
||
|
if (condition) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var text = "Warning: " + message;
|
||
|
|
||
|
if (typeof console !== 'undefined') {
|
||
|
console.warn(text);
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
throw Error(text);
|
||
|
} catch (x) {}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return warning;
|
||
|
|
||
|
}));
|