cyan(
text
):string
Format the text so it appears cyan.
Parameter | Type | Description |
---|---|---|
text |
string |
The text to format. |
string
Text formatted so it appears cyan.
dim(
text
):string
Format the text so it appears dim.
Parameter | Type | Description |
---|---|---|
text |
string |
The text to format. |
string
Text formatted so it appears dim.
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.
Parameter | Type | Description |
---|---|---|
...parameters |
[number , FormatOptions ] |
The same parameters as getElapsedTimeFormatted. |
string
Localized text label showing elapsed time with units.
green(
text
):string
Format the text so it appears green.
Parameter | Type | Description |
---|---|---|
text |
string |
The text to format. |
string
Text formatted so it appears green.
printError(
message
):void
Print an error message to the console in red.
Parameter | Type | Description |
---|---|---|
message |
string |
A message to print to the console. |
void
printInfo(
message
):void
Print an informational message to the console in cyan.
Parameter | Type | Description |
---|---|---|
message |
string |
A message to print to the console. |
void
printSuccess(
message
):void
Print a success message to the console in green.
Parameter | Type | Description |
---|---|---|
message |
string |
A message to print to the console. |
void
printWarning(
message
):void
Print a warning message to the console in yellow.
Parameter | Type | Description |
---|---|---|
message |
string |
A message to print to the console. |
void
red(
text
):string
Format the text so it appears red.
Parameter | Type | Description |
---|---|---|
text |
string |
The text to format. |
string
Text formatted so it appears red.
white(
text
):string
Format the text so it appears white.
Parameter | Type | Description |
---|---|---|
text |
string |
The text to format. |
string
Text formatted so it appears white.
yellow(
text
):string
Format the text so it appears yellow.
Parameter | Type | Description |
---|---|---|
text |
string |
The text to format. |
string
Text formatted so it appears yellow.