1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 09:10:40 -05:00
denoland-deno/colors
Vincent LE GOFF 4543b563a9 Eslint fixes (#356)
Make warnings fail
2019-04-24 07:41:22 -04:00
..
mod.ts Add eslint for linting (#235) 2019-03-04 19:53:35 -05:00
README.md Replace deno.land/x/ with deno.land/std/ (#239) 2019-03-06 10:24:53 -05:00
test.ts Eslint fixes (#356) 2019-04-24 07:41:22 -04:00

colors

Is a basic console color module intended for Deno. It is inspired by chalk, kleur, and colors on npm.

Usage

The main modules exports several functions which can color the output to the console:

import { bgBlue, red, bold } from "https://deno.land/std/colors/mod.ts";

console.log(bgBlue(red(bold("Hello world!"))));

This module supports NO_COLOR environmental variable disabling any coloring if NO_COLOR is set.

TODO

  • Currently, it just assumes it is running in an environment that supports ANSI escape code terminal coloring. It should actually detect, specifically windows and adjust properly.

  • Test coverage is very basic at the moment.


Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.