PaletteError

PaletteError

new PaletteError(message)

Constructs a new PaletteError instance.

Description:
  • Constructs a new PaletteError instance.

Source:
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.

Description:
  • Generates a formatted message with optional styles.

Source:
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.

Description:
  • Adds padding around the provided content.

Source:
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.

Description:
  • Returns a Chalk instance with specified styles applied.

Source:
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