@varundevpro/colors
Version:
Simple package to print colorful logs in your console.
13 lines (12 loc) • 588 B
JavaScript
module.exports = {
black: text => console.log("\x1b[30m%s\x1b[0m", text),
red: text => console.log("\x1b[31m%s\x1b[0m", text),
green: text => console.log("\x1b[32m%s\x1b[0m", text),
yellow: text => console.log("\x1b[33m%s\x1b[0m", text),
blue: text => console.log("\x1b[34m%s\x1b[0m", text),
magenta: text => console.log("\x1b[35m%s\x1b[0m", text),
cyan: text => console.log("\x1b[36m%s\x1b[0m", text),
white: text => console.log("\x1b[37m%s\x1b[0m", text),
gray: text => console.log("\x1b[90m%s\x1b[0m", text),
grey: text => console.log("\x1b[90m%s\x1b[0m", text)
};