Helper utility for printing colored text in Node or the Browser.
This library was inspired by chalk
. I wrote it because I often want to bounce between Node (Jest) and the browser when debugging a problem, and chalk
only supports Node.
import {bold, red} from 'print-color';
red('This text will be red.');
red.bold('This text will be red and bold');
bold.red('This text will also be red and bold');
This utility works in the browser:
It also works in Node: