term-color
A lighter weight alternative to chalk
Last updated 11 years ago by raynos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install term-color 
SYNC missed versions from official npm registry.

term-color

A lighter weight alternative to chalk

Example

var TermColor = require("term-color");

console.log(TermColor.red('foo'))

Motivation

raynos at raynos-SVS15127PXB  ~/projects/chalk on master
$ npm ls --prod
chalk@1.0.0 /home/raynos/projects/chalk
├── ansi-styles@2.0.1
├── escape-string-regexp@1.0.3
├─┬ has-ansi@1.0.3
│ ├── ansi-regex@1.1.1
│ └── get-stdin@4.0.1
├─┬ strip-ansi@2.0.1
│ └── ansi-regex@1.1.1
└── supports-color@1.3.1
raynos at raynos-SVS15127PXB  ~/projects/term-color on master
$ npm ls --prod
term-color@1.0.0 /home/raynos/projects/term-color
├── ansi-styles@2.0.1
└── supports-color@1.3.1

term-color adds colors to your library but only costs 3 dependencies instead of costing 9 dependencies.

Supported formats

TermColor.black('text');
TermColor.red('text');
TermColor.green('text');
TermColor.yellow('text');
TermColor.blue('text');
TermColor.magenta('text');
TermColor.cyan('text');
TermColor.white('text');
TermColor.gray('text');
TermColor.bgBlack('text');
TermColor.bgRed('text');
TermColor.bgGreen('text');
TermColor.bgYellow('text');
TermColor.bgBlue('text');
TermColor.bgMagenta('text');
TermColor.bgCyan('text');
TermColor.bgWhite('text');
TermColor.reset('text');
TermColor.bold('text');
TermColor.dim('text');
TermColor.italic('text');
TermColor.underline('text');
TermColor.inverse('text');
TermColor.hidden('text');
TermColor.strikethrough('text');

Installation

npm install term-color

Tests

npm test

Contributors

  • Raynos

MIT Licensed

Current Tags

  • 1.0.1                                ...           latest (11 years ago)

2 Versions

  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 0
This Month 9
Last Day 0
Last Week 9
Last Month 0
Dependencies (2)
Dev Dependencies (5)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE