Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "ansi"

Index

Variables

Object literals

Variables

Const ANSI_FLAGS

ANSI_FLAGS: string[] = ["", "1", "2", "1;2", "4", "1;4", "2;4", "1;2;4"]

Const ANSI_RESET

ANSI_RESET: "" = `\x1b[0m`

Object literals

Const FMT_ANSI16

FMT_ANSI16: object

String format preset, translating canvas format info to ANSI 4bit control sequences.

https://stackoverflow.com/a/33206814/294515

end

end: string = ANSI_RESET

prefix

prefix: string = ANSI_RESET

start

start: (x: A) => B = memoize1((x: number) => {let res = [];let y = x & 0xf;y && res.push(29 + ((x >> 4) & 1) * 60 + y);y = (x >> 5) & 0xf;y && res.push(39 + ((x >> 9) & 1) * 60 + y);y = x >> 10;y && res.push(ANSI_FLAGS[y]);return "\x1b[" + res.join(";") + "m";})

Type declaration

    • (x: A): B
    • Parameters

      • x: A

      Returns B

suffix

suffix: string = ""

Generated using TypeDoc