cli-beautifier
v1.0.4
Published
A very Minimal Package to Style your Terminal output
Downloads
19
Maintainers
Readme
A very minimal npm-package to beautify your cli
Usage
Raw Styling
import { Beautifier, Colors, Properties, BackgroundColors, Gap} from "cli-beautifier"
// returns colored text
let text = "Hello World"
text = Beautifier(text, Colors.error)
// Colored, Background text
text = Beautifier("hello world", Colors.error, BackgroundColors.error);
console.log(text)
// Colored, Background, Indented and fontStyled text
text = Beautifier("hello", Colors.pass, BackgroundColors.error, 4, Properties.bold);
console.log(text)
Using: built-in styles
import {Beautify, Gap} from "cli-beautifier"`
// Danger without Background.
const text = Beautify.error("hello world");
console.log(text);
// Pass with Background and Tab Indentation
console.log(Beautify.pass("hello", true, Gap.Tab));