Skip to content

@toolcog/util

Toolcog utilities

Functions

countLines()

countLines(text): number

Parameters

text: string

Returns

number

Defined in

lines.ts:3


getLastLine()

getLastLine(text): string

Parameters

text: string

Returns

string

Defined in

lines.ts:101


getLastNonEmptyLine()

getLastNonEmptyLine(text): string

Parameters

text: string

Returns

string

Defined in

lines.ts:106


reduceLines()

reduceLines<T>(text, callback, value): T

Type Parameters

T

Parameters

text: string

callback

value: T

Returns

T

Defined in

lines.ts:18


replaceLines()

replaceLines(text, callback): string

Parameters

text: string

callback

Returns

string

Defined in

lines.ts:59


splitLines()

splitLines(text): string[]

Parameters

text: string

Returns

string[]

Defined in

lines.ts:90