Methods
colorfy(message, coloropt, defaultColoropt) → {string}
- Description:
- Wrap the specified message with color codes.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The message | |
color |
string |
<optional> |
The color |
defaultColor |
string |
<optional> |
default color to be use if the specified color is not applicable. |
Returns:
The message surrounded with color codes.
- Type
- string
error(message, coloropt, …args) → {this}
- Description:
- Logs error message.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The message. | |
color |
string |
<optional> |
The color to be used. |
args |
any |
<repeatable> |
Additional arguments. |
Returns:
The current instance for chaining.
- Type
- this
group(label, coloropt) → {this}
- Description:
- Starts grouped output.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
label |
string | The group label. | |
color |
string |
<optional> |
The color to be used. |
Returns:
The current instance for chaining.
- Type
- this
groupCollapsed(label, coloropt) → {this}
- Description:
- Starts grouped output (collapsed by default).
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
label |
string | The group label. | |
color |
string |
<optional> |
The color to be used. |
Returns:
The current instance for chaining.
- Type
- this
groupEnd() → {this}
- Description:
- Ends group output.
- Source:
Returns:
The current instance for chaining.
- Type
- this
info(message, coloropt, …args) → {this}
- Description:
- Logs information message.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The message. | |
color |
string |
<optional> |
The color to be used. |
args |
any |
<repeatable> |
Additional arguments. |
Returns:
The current instance for chaining.
- Type
- this
log(message, coloropt, …args) → {this}
- Description:
- Logs a message.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The message. | |
color |
string |
<optional> |
The color to be used. |
args |
any |
<repeatable> |
Additional arguments. |
Returns:
The current instance for chaining.
- Type
- this
prefixMessage(message) → {string}
- Description:
- Prefix the specified message with the necessary indentation.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns:
- The indented message.
- Type
- string
warn(message, coloropt, …args) → {this}
- Description:
- Logs warning message.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The message. | |
color |
string |
<optional> |
The color to be used. |
args |
any |
<repeatable> |
Additional arguments. |
Returns:
The current instance for chaining.
- Type
- this