UNPKG

js-randomness-predictor

Version:

Predict Math.random output in Node, Deno, Bun, Chrome, Firefox, and Safari

21 lines (20 loc) 542 B
function redText(text) { return `\x1b[31m${text}\x1b[0m`; } function yellowText(s) { return `\x1b[33m${s}\x1b[0m`; } export default 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(" ")}`)); } }