blob: aa5ba568fdaf2dbde4aa7d2ef64f2b61d6ed3b73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function debug(logLevel, ...messages) {
if (logLevel === 'debug')
console.log(...messages);
}
function warn(logLevel, warning) {
if (logLevel === 'debug' || logLevel === 'warn') {
if (typeof process !== 'undefined' && process.emitWarning)
process.emitWarning(warning);
else
console.warn(warning);
}
}
export { debug, warn };
|