0.0.5 • Published 2 years ago

js-shade v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

js-shade

An extremely lightweight Node.js library created to simplify formatting terminal text with ANSI codes.

Makes adding color or style to console output much easier, with less room for error.


Install

yarn add js-shade

Usage

Currently only supports ES6 imports. CommonJS require not yet supported.

  import { Shade } from 'js-shade';

  console.log(Shade.red('Red text!'));
  console.log(Shade.yellow('Yellow text!'));
  console.log(Shade.black('Black text!'));
  console.log(Shade.cyan('Cyan text!'));
  console.log(Shade.green('Green text!'));
  console.log(Shade.blue('Blue text!'));
  console.log(Shade.magenta('Magenta text!'));
  console.log(Shade.white('White text!'));
  console.log(Shade.underline('Underscored text!'));
  console.log(Shade.bright('Bright text!'));
  console.log(Shade.dim('Dim text!'));
  console.log(Shade.reverse('Reversed text!'));

Method Chaining

js-shade supports method chaining. So you can combine multiple formats in one statement.

  console.log(Shade.red().underline('Red underlined text!'));
  console.log(Shade.underline().red('Also red underlined text!'));
  console.log(Shade.bright().yellow('Bright yellow text!'));
  console.log(Shade.dim().green('Dim green text!'));
  console.log(Shade.bright().underline().red('Bright red underlined text!'));
0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago