Library
core
src
util
term
Readme

Lawtext core referencesDocs


Lawtext core references / core/src/util/term

core/src/util/term

Index

Classes

Enumerations

TERMC

Enumeration Members

BLUE

BLUE: "\u001b[34m"

Defined in

core/src/util/term.ts:13 (opens in a new tab)


CYAN

CYAN: "\u001b[36m"

Defined in

core/src/util/term.ts:17 (opens in a new tab)


DEFAULT

DEFAULT: "\u001b[39m"

Defined in

core/src/util/term.ts:5 (opens in a new tab)


GREEN

GREEN: "\u001b[32m"

Defined in

core/src/util/term.ts:9 (opens in a new tab)


MAGENTA

MAGENTA: "\u001b[35m"

Defined in

core/src/util/term.ts:15 (opens in a new tab)


RED

RED: "\u001b[31m"

Defined in

core/src/util/term.ts:7 (opens in a new tab)


YELLOW

YELLOW: "\u001b[33m"

Defined in

core/src/util/term.ts:11 (opens in a new tab)

Functions

toTableText()

toTableText(table, width): string

Parameters

table: string[][]

width: number

Returns

string

Defined in

core/src/util/term.ts:82 (opens in a new tab)


widthWOColor()

widthWOColor(text): number

Parameters

text: string

Returns

number

Defined in

core/src/util/term.ts:77 (opens in a new tab)


withEllipsis()

withEllipsis(text, maxLength): string

Parameters

text: string

maxLength: number

Returns

string

Defined in

core/src/util/term.ts:113 (opens in a new tab)


wrap()

wrap(row, width): IterableIterator<string[]>

Parameters

row: string[]

width: number

Returns

IterableIterator<string[]>

Defined in

core/src/util/term.ts:68 (opens in a new tab)


wrapSingle()

wrapSingle(s, width, afterFirstLineIndent): IterableIterator<string>

Parameters

s: string

width: number

afterFirstLineIndent: number = 0

Returns

IterableIterator<string>

Defined in

core/src/util/term.ts:41 (opens in a new tab)