bvaughn / print-color

Utility for printing colored text in Node or the Browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

print-color

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.

Usage example

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');

Environments

This utility works in the browser:

Screen Shot of print-color demo in Node terminal

It also works in Node:

Screen Shot of print-color demo in Chrome console

About

Utility for printing colored text in Node or the Browser


Languages

Language:JavaScript 100.0%