$ npm install colorful
It's not just color, it's everything colorful in terminal.
Color in terminal and only terminal.
As a programmer, you think they are functions:
var color = require('colorful').color
color.red('hello')
color.underline('hello')
color.red(color.underline('hello'))
As a human, you think you are a painter:
var paint = require('colorful').paint
paint('hello').red.color
paint('hello').bold.underline.red.color
WTF, is bold, underline a color? If you don't like the idea, try:
paint('hello').bold.underline.red.style
As an alien, you are from outer space, you think it should be:
require('colorful').colorful()
'hello'.to.red.color
'hello'.to.underline.bold.red.color
'hello'.to.underline.bold.red.style
As a detective, you think we should detect if color is supported:
require('colorful').isSupported
// we can disable color
require('colorful').disabled = true
require('colorful').isSupported
// => false
1.3.0
removed logging
© 2010 - cnpmjs.org x YWFE | Home | YWFE