Skip to content

Latest commit

 

History

History
259 lines (142 loc) · 4.99 KB

consoleUtils.md

File metadata and controls

259 lines (142 loc) · 4.99 KB

consoleUtils

Functions

cyan()

cyan(text): string

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.

Source

src/consoleUtils.mts:17


dim()

dim(text): string

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.

Source

src/consoleUtils.mts:26


getPerformanceLabel()

getPerformanceLabel(...parameters): string

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.

Source

src/consoleUtils.mts:73


green()

green(text): string

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.

Source

src/consoleUtils.mts:35


printError()

printError(message): void

Print an error message to the console in red.

Parameters

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

Returns

void

Source

src/consoleUtils.mts:82


printInfo()

printInfo(message): void

Print an informational message to the console in cyan.

Parameters

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

Returns

void

Source

src/consoleUtils.mts:90


printSuccess()

printSuccess(message): void

Print a success message to the console in green.

Parameters

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

Returns

void

Source

src/consoleUtils.mts:98


printWarning()

printWarning(message): void

Print a warning message to the console in yellow.

Parameters

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

Returns

void

Source

src/consoleUtils.mts:106


red()

red(text): string

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.

Source

src/consoleUtils.mts:44


white()

white(text): string

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.

Source

src/consoleUtils.mts:53


yellow()

yellow(text): string

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.

Source

src/consoleUtils.mts:62