Library
core
modules
Core Src Util Term

Lawtext core references / core/src/util/term

Module: core/src/util/term

Table of contents

Enumerations

Classes

Functions

Functions

toTableText

toTableText(table, width): string

Parameters

NameType
tablestring[][]
widthnumber

Returns

string

Defined in

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


widthWOColor

widthWOColor(text): number

Parameters

NameType
textstring

Returns

number

Defined in

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


withEllipsis

withEllipsis(text, maxLength): string

Parameters

NameType
textstring
maxLengthnumber

Returns

string

Defined in

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


wrap

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

Parameters

NameType
rowstring[]
widthnumber

Returns

IterableIterator<string[]>

Defined in

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


wrapSingle

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

Parameters

NameTypeDefault value
sstringundefined
widthnumberundefined
afterFirstLineIndentnumber0

Returns

IterableIterator<string>

Defined in

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