mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
4.9 KiB
JSON
1 line
4.9 KiB
JSON
|
{"ast":null,"code":"var logLevel = \"info\";\n\nfunction dummy() {}\n\nfunction shouldLog(level) {\n var shouldLog = logLevel === \"info\" && level === \"info\" || [\"info\", \"warning\"].indexOf(logLevel) >= 0 && level === \"warning\" || [\"info\", \"warning\", \"error\"].indexOf(logLevel) >= 0 && level === \"error\";\n return shouldLog;\n}\n\nfunction logGroup(logFn) {\n return function (level, msg) {\n if (shouldLog(level)) {\n logFn(msg);\n }\n };\n}\n\nmodule.exports = function (level, msg) {\n if (shouldLog(level)) {\n if (level === \"info\") {\n console.log(msg);\n } else if (level === \"warning\") {\n console.warn(msg);\n } else if (level === \"error\") {\n console.error(msg);\n }\n }\n};\n/* eslint-disable node/no-unsupported-features/node-builtins */\n\n\nvar group = console.group || dummy;\nvar groupCollapsed = console.groupCollapsed || dummy;\nvar groupEnd = console.groupEnd || dummy;\n/* eslint-enable node/no-unsupported-features/node-builtins */\n\nmodule.exports.group = logGroup(group);\nmodule.exports.groupCollapsed = logGroup(groupCollapsed);\nmodule.exports.groupEnd = logGroup(groupEnd);\n\nmodule.exports.setLogLevel = function (level) {\n logLevel = level;\n};\n\nmodule.exports.formatError = function (err) {\n var message = err.message;\n var stack = err.stack;\n\n if (!stack) {\n return message;\n } else if (stack.indexOf(message) < 0) {\n return message + \"\\n\" + stack;\n } else {\n return stack;\n }\n};","map":{"version":3,"sources":["/app/node_modules/webpack/hot/log.js"],"names":["logLevel","dummy","shouldLog","level","indexOf","logGroup","logFn","msg","module","exports","console","log","warn","error","group","groupCollapsed","groupEnd","setLogLevel","formatError","err","message","stack"],"mappings":"AAAA,IAAIA,QAAQ,GAAG,MAAf;;AAEA,SAASC,KAAT,GAAiB,CAAE;;AAEnB,SAASC,SAAT,CAAmBC,KAAnB,EAA0B;AACzB,MAAID,SAAS,GACXF,QAAQ,KAAK,MAAb,IAAuBG,KA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P,CAAeO,QAAf,GAA0BX,QAAQ,CAACW,QAAD,CAAlC;;AAEAR,MAAM,CAACC,OAAP,CAAeQ,WAAf,GAA6B,UAASd,KAAT,EAAgB;AAC5CH,EAAAA,QAAQ,GAAGG,KAAX;AACA,CAFD;;AAIAK,MAAM,CAACC,OAAP,CAAeS,WAAf,GAA6B,UAASC,GAAT,EAAc;AAC1C,MAAIC,OAAO,GAAGD,GAAG,CAACC,OAAlB;AACA,MAAIC,KAAK,GAAGF,GAAG,CAACE,KAAhB;;AACA,MAAI,CAACA,KAAL,EAAY;AACX,WAAOD,OAAP;AACA,GAFD,MAEO,IAAIC,KAAK,CAACjB,OAAN,CAAcgB,OAAd,IAAyB,CAA7B,EAAgC;AACtC,WAAOA,OAAO,GAAG,IAAV,GAAiBC,KAAxB;AACA,GAFM,MAEA;AACN,WAAOA,KAAP;AACA;AACD,CAVD","sourcesContent":["var logLevel = \"info\";\n\nfunction dummy() {}\n\nfunction shouldLog(level) {\n\tvar shouldLog =\n\t\t(logLevel === \"info\" && level === \"info\") ||\n\t\t([\"info\", \"warning\"].indexOf(logLevel) >= 0 && level === \"warning\") ||\n\t\t([\"info\", \"warning\", \"error\"].indexOf(logLevel) >= 0 && level === \"error\");\n\treturn shouldLog;\n}\n\nfunction logGroup(logFn) {\n\treturn function(level, msg) {\n\t\tif (shouldLog(level)) {\n\t\t\tlogFn(msg);\n\t\t}\n\t};\n}\n\nmodule.exports = function(level, msg) {\n\tif (shouldLog(level)) {\n\t\tif (level === \"info\") {\n\t\t\tconsole.log(msg
|