Anstyle
A very simple utility to change colors and styles of command line outputs (logs)
npm i anstyle
or:
yarn add anstyle
Sample
import {BOLD, BLUE, GREEN, RED, NORMAL, RESET} from 'anstyle'
console.log(`This ${BOLD}is a ${BLUE}rich${NORMAL} and ${RED}colorful ${GREEN}text${RESET}.`)
Prints:
You can summarize the above:
import {D, B, G, N, R, T} from 'anstyle'
console.log(`This ${D}is a ${B}rich${N} and ${R}colorful ${G}text${T}.`)
API reference
The source is very simple and illustrative. It's your document: main.ts