Skip to content

stylize

function stylize(input, ...codes): string

Defined in: package/src/utils.ts:238

Stylizes the given string by applying the specified ANSI codes.

The function resets specific styles automatically, such as text color, background color, or other text formatting, based on the provided ANSI codes.

Parameters

ParameterTypeDescription

input

string

The string to be stylized.

codes

ANSICodes[]

ANSI codes to apply to the string.

Returns

string

The stylized string with the applied ANSI codes.