UNPKG

421 BJavaScriptView Raw
1'use strict';
2
3function debug(logLevel, ...messages) {
4 if (logLevel === 'debug')
5 console.log(...messages);
6}
7function warn(logLevel, warning) {
8 if (logLevel === 'debug' || logLevel === 'warn') {
9 if (typeof process !== 'undefined' && process.emitWarning)
10 process.emitWarning(warning);
11 else
12 console.warn(warning);
13 }
14}
15
16exports.debug = debug;
17exports.warn = warn;