1.1.2 • Published 6 years ago

colors4strict v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

colors4strict

Node module that allows you to color your console logging, even in strict mode

Usage (Example code below:)

/* Require the colors4strict nodemodule */
const colors = require('colors4strict');

/* Your text here */
var text = 'Text';

text = colors.white(text);   // returns the text in  white
text = colors.cyan(text);    // returns the text in  cyan
text = colors.magenta(text); // returns the text in  magenta
text = colors.blue(text);    // returns the text in  blue
text = colors.yellow(text);  // returns the text in  yellow
text = colors.green(text);   // returns the text in  green
text = colors.red(text);     // returns the text in  red
text = colors.black(text);   // returns the text in  black

/* This also works */
text = colors.green('Green ' + colors.yellow('Yellow ') + 'Green');

// ...
console.log(text); 

Removing colors

/* Example */
var coloredText = colors.blue('Text');

/* Logs the text in the blue color */
console.log(text); 


coloredText = colors.remove(coloredText);

/* Logs the text in the default cli color */
console.log(text); 

Disabling colors

If you wanna disable the colors pass the following argument --no-colors to your application Example:

node myscript.js --no-colors
1.1.2

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago