Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md support NO_COLOR in colors module (#182) Feb 10, 2019
example.ts Add missiong copyright headers (#177) Feb 7, 2019
mod.ts support NO_COLOR in colors module (#182) Feb 10, 2019
test.ts Add missiong copyright headers (#177) Feb 7, 2019

README.md

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/x/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.