kolorist
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

kolorist

Tiny library to put colors into stdin/stdout 🎉

Screenshot of terminal colors

Usage

npm install --save-dev kolorist
import { red, cyan } from 'kolorist';

console.log(red(`Error: something failed in ${cyan('my-file.js')}.`));

You can also disable colors globally via the following environment variables:

  • NODE_DISABLE_COLORS
  • TERM=dumb
  • FORCE_COLOR=0

On top of that you can disable colors right from node:

import { options, red } from 'kolorist';

options.enabled = false;
console.log(red('foo'));
// Logs a string without colors

License

MIT, see the license file.

Readme

Keywords

none

Package Sidebar

Install

npm i kolorist@1.0.0

Version

1.0.0

License

MIT

Unpacked Size

34.7 kB

Total Files

9

Last publish

Collaborators

  • marvinhagemeister