Functions

f
createColors(enabled: boolean)

Creates a set of ANSI color helpers with coloring enabled or disabled.

f
magenta(text?: string): string | MagentaReturn
2 overloads

ANSI magenta text. Call without arguments to chain: magenta().bold(text).

f
onBlue(text: string): string

The same on a blue ground — a 4xx, which is information rather than breakage.

f
onGreen(text: string): string

The terminal's own text on a green ground, padded — a 2xx.

f
onRed(text: string): string

The same on a red ground — a 5xx, or a request that never got an answer.

f
onYellow(text: string): string

The same on a yellow ground — a 3xx, or a measurement worth a second look.

Variables

v
colorEnabled: boolean

Whether this process should emit colour: the answer every helper below already uses.