Skip to content

format() function

Home > streplts > format

Decorates a string sequence with a targeted ANSI formatting prefix color and clear reset code.

Signature:

format: (col: string, s: string) => string

Parameter

Type

Description

col

string

Target ANSI color configuration code snippet.

s

string

Target textual payload contents to transform.

Returns:

string

Formatted colored string. *