
npm install colors
By popular demand, colors now ships with two types of usages!
The super nifty way
var colors = ; console; // outputs green text console // outputs red underlined text console; // inverses the color console; // rainbow console; // Drops the bass or a slightly less nifty way which doesn't extend String.prototype
var colors = ; console; // outputs green text console // outputs red underlined text console; // inverses the color console; // rainbow console; // Drops the bass I prefer the first way. Some people seem to be afraid of extending String.prototype and prefer the second way.
If you are writing good code you will never have an issue with the first approach. If you really don't want to touch String.prototype, the second usage will not touch String native object.
To disable colors you can pass the following arguments in the command line to your application:
node myapp.js --no-colorvar name = 'Marak';console;// outputs -> 'Hello Marak' var colors = ; colors; // outputs red text console; // outputs yellow text console;var colors = ; // set single property var error = colorsred;; // set theme colors; // outputs red text console; // outputs yellow text console; You can also combine them:
var colors = ; colors; console;Protip: There is a secret undocumented style in colors. If you find the style you can summon him.