basant307/AI_Governance_Project
048
1# kolorist2 3Tiny library to put colors into stdin/stdout :tada:4 56 7## Usage8 9```bash10npm install --save-dev kolorist11```12 13```js14import { red, cyan } from 'kolorist';15 16console.log(red(`Error: something failed in ${cyan('my-file.js')}.`));17```18 19You can also disable or enable colors globally via the following environment variables:20 21- disable:22 - `NODE_DISABLE_COLORS`23 - `NO_COLOR`24 - `TERM=dumb`25 - `FORCE_COLOR=0`26 27- enable:28 - `FORCE_COLOR=1`29 - `FORCE_COLOR=2`30 - `FORCE_COLOR=3`31 32On top of that you can disable colors right from node:33 34```js35import { options, red } from 'kolorist';36 37options.enabled = false;38console.log(red('foo'));39// Logs a string without colors40```41 42You can also strip colors from a string:43 44```js45import { red, stripColors } from 'kolorist';46 47console.log(stripColors(red('foo')));48// Logs 'foo'49```50 51### License52 53`MIT`, see [the license file](./LICENSE).54 