js-randomness-predictor
Version:
Predict Math.random output in Node, Chrome, and Firefox
24 lines (23 loc) • 630 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function redText(text) {
return `\x1b[31m${text}\x1b[0m`;
}
function yellowText(s) {
return `\x1b[33m${s}\x1b[0m`;
}
class Logger {
static info(...messages) {
console.info(`[INFO] ${messages.join(" ")}`);
}
static log(...messages) {
console.log(`[LOG] ${messages.join(" ")}`);
}
static warn(...messages) {
console.warn(yellowText(`[WARN] ${messages.join(" ")}`));
}
static error(...messages) {
console.error(redText(`[ERROR] ${messages.join(" ")}`));
}
}
exports.default = Logger;