fancy-console
Colorize JavaScript console messages, a fancy tool for Node command line
Installation
Locally:
npm install fancy-console --save
Globally:
npm install -g fancy-console
To run the test inside the module:
cd node_modules/fancy-consolenpm test
How to use it?
var fc = // Access to console with fc.cmdfccmd // Some colorized messagesfcfcfcfcfcfc var myStyle = fcstylesinverse + fccolorsblue;fc // Message with parametervar myVar = 15;fc fccmd
Pre-defined messages:
Name | Render | Method |
---|---|---|
crit | Text in bold italic purple | `function crit(message, args);` |
error | Text in red | `function error(message, args);` |
warn | Text in yellow | `function warn(message, args);` |
info | Text in cyan | `function info(message, args);` |
success | Text in green | `function success(message, args);` |
log | Text in white | `function log(message, args);` |
Colors and styles
Available colors:
Color | Render | Attribute |
---|---|---|
Black | Text in black | fc.colors.black |
Red | Text in red | fc.colors.red |
Yellow | Text in yellow | fc.colors.yellow |
Green | Text in green | fc.colors.greeb |
Blue | Text in blue | fc.colors.blue |
Purple | Text in purple | fc.colors.purple |
Cyan | Text in cyan | fc.colors.cyan |
White | Text in white | fc.colors.white |
Available styles:
Style | Render | Attribute |
---|---|---|
Bold | Text in bold | fc.styles.bold |
Italic | Text in italic | fc.styles.italic |
Underline | Text underline | fc.styles.underline |
Strike | fc.styles.strike | |
Inverse | Text with background | fc.styles.bold |