new PaletteError(message)
Constructs a new PaletteError instance.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Error | The error message or an Error object. |
Methods
info(styles) → {string}
Generates a formatted message with optional styles.
Parameters:
Name | Type | Description |
---|---|---|
styles |
string | The styles to apply. |
Returns:
The formatted message.
- Type
- string
padding(content) → {string}
Adds padding around the provided content.
Parameters:
Name | Type | Description |
---|---|---|
content |
string | The content to pad. |
Returns:
The padded content.
- Type
- string
palette(styles, chain) → {ChalkInstance}
Returns a Chalk instance with specified styles applied.
Parameters:
Name | Type | Description |
---|---|---|
styles |
string | The styles to apply. |
chain |
ChalkInstance | The Chalk instance to chain with. |
Returns:
A Chalk instance with the specified styles.
- Type
- ChalkInstance