better-node-print
v1.1.0
Published
Better and Colorful Print Messages for Node.js
Downloads
12
Maintainers
Readme
better-node-print
A Node.js package to make prettier console.log() messages.
Table of Content
Installing
npm install better-node-print
Example
const { print, C, CB, R, printc } = require('better-node-print');
print(C.yellow, "Hello", R, CB.red, " World!", R);
// 'Hello': Yellow Text, ' World!': Red Background
// C -> Text Color, CB -> Background Color, R -> Reset Colors
print(`${C.yellow}, "Hello", ${R+CB.red}, " World!", ${R}`);
// 'Hello': Yellow Text, ' World!': Red Background
print([
{text: "Hel", color: "yellow"},
{text: "lo", bgColor: "red"},
{text: " World.", color: "magenta", bgColor: "green"}
]);