asdf-games/node_modules/term-color
2019-08-20 17:59:26 +02:00
..
node_modules Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
test Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
.jshintrc Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
.npmignore Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
.travis.yml Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
index.js Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
LICENSE Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
package.json Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00
README.md Migrated asdf library and all games / tests to gitea and added package.json to all projects. 2019-08-20 17:59:26 +02:00

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