cli-beautifier
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i cli-beautifier

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

6.49 kB

Total Files

4

Last publish

Collaborators

  • surya-bahadur-basnet