mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 09:10:40 -05:00
a489edc355
Original: fa5b3dfc9c
29 lines
802 B
Markdown
29 lines
802 B
Markdown
# colors
|
|
|
|
Is a basic console color module intended for [Deno](https://deno.land/). It is
|
|
inspired by [chalk](https://www.npmjs.com/package/chalk),
|
|
[kleur](https://www.npmjs.com/package/kleur), and
|
|
[colors](https://www.npmjs.com/package/colors) on npm.
|
|
|
|
## Usage
|
|
|
|
The main modules exports several functions which can color the output to the
|
|
console:
|
|
|
|
```ts
|
|
import { bgBlue, red, bold } from "https://deno.land/x/std/colors/mod.ts";
|
|
|
|
console.log(bgBlue(red(bold("Hello world!"))));
|
|
```
|
|
|
|
## 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.
|