Skip to content

consoleUtils

github-actions edited this page Jun 2, 2026 · 24 revisions

consoleUtils

Functions

cyan()

cyan(text): string

Defined in: src/consoleUtils.mts:13

Format the text so it appears cyan.

Parameters

Parameter Type Description
text string The text to format.

Returns

string

Text formatted so it appears cyan.


dim()

dim(text): string

Defined in: src/consoleUtils.mts:22

Format the text so it appears dim.

Parameters

Parameter Type Description
text string The text to format.

Returns

string

Text formatted so it appears dim.


getPerformanceLabel()

getPerformanceLabel(...parameters): string

Defined in: src/consoleUtils.mts:69

Get a text label showing the elapsed time between the provided start time parameter and the time the function is called. Optionally a minimum time unit can be chosen (set to ms by default) or a specific time unit can be enforced. Also, formatting locale can be overridden.

Parameters

Parameter Type Description
...parameters [number, FormatOptions] The same parameters as getElapsedTimeFormatted.

Returns

string

Localized text label showing elapsed time with units.


green()

green(text): string

Defined in: src/consoleUtils.mts:31

Format the text so it appears green.

Parameters

Parameter Type Description
text string The text to format.

Returns

string

Text formatted so it appears green.


printError()

printError(message): void

Defined in: src/consoleUtils.mts:78

Print an error message to the console in red.

Parameters

Parameter Type Description
message string A message to print to the console.

Returns

void


printInfo()

printInfo(message): void

Defined in: src/consoleUtils.mts:86

Print an informational message to the console in cyan.

Parameters

Parameter Type Description
message string A message to print to the console.

Returns

void


printSuccess()

printSuccess(message): void

Defined in: src/consoleUtils.mts:94

Print a success message to the console in green.

Parameters

Parameter Type Description
message string A message to print to the console.

Returns

void


printWarning()

printWarning(message): void

Defined in: src/consoleUtils.mts:102

Print a warning message to the console in yellow.

Parameters

Parameter Type Description
message string A message to print to the console.

Returns

void


red()

red(text): string

Defined in: src/consoleUtils.mts:40

Format the text so it appears red.

Parameters

Parameter Type Description
text string The text to format.

Returns

string

Text formatted so it appears red.


white()

white(text): string

Defined in: src/consoleUtils.mts:49

Format the text so it appears white.

Parameters

Parameter Type Description
text string The text to format.

Returns

string

Text formatted so it appears white.


yellow()

yellow(text): string

Defined in: src/consoleUtils.mts:58

Format the text so it appears yellow.

Parameters

Parameter Type Description
text string The text to format.

Returns

string

Text formatted so it appears yellow.

Clone this wiki locally