ansicolors

Functions that surround a string with ansicolor codes so it prints in color.

6 个版本
安装
npm install ansicolors
yarn add ansicolors
pnpm add ansicolors
bun add ansicolors
README

ansicolors build status

Functions that surround a string with ansicolor codes so it prints in color.

Installation

npm install ansicolors

Usage

var colors = require('ansicolors');

var redHerring = colors.red('herring');
var blueMoon = colors.blue('moon');
var brighBlueMoon = colors.brightBlue('moon');

console.log(redHerring);      // this will print 'herring' in red
console.log(blueMoon);        // this 'moon' in blue
console.log(brightBlueMoon);  // I think you got the idea

Tests

Look at the tests to see more examples and/or run them via:

npm explore ansicolors && npm test
版本列表
0.3.2 2013-12-03
0.3.1 2013-11-24
0.3.0 2013-11-08
0.2.1 2013-01-12
0.2.0 2013-01-12
0.1.0 2013-01-11