Skip to main content

Module: style

References

strConcat

Re-exports strConcat


indent

Re-exports indent

Type Aliases

AnsiColor

Ƭ AnsiColor: keyof typeof ansiColors

Defined in

src/style.ts:30


StringStyle

Ƭ StringStyle: z.infer<typeof StringStyle>

Defined in

src/style.ts:32

src/style.ts:39

Variables

ansiStyles

Const ansiStyles: Object

Type declaration

NameType
resetstring
boldstring
underlinestring
blackstring

Defined in

src/style.ts:4


ansiColors

Const ansiColors: Object

Type declaration

NameType
red"\u001b[31m"
green"\u001b[32m"
yellow"\u001b[33m"
blue"\u001b[34m"
magenta"\u001b[35m"
cyan"\u001b[36m"
white"\u001b[37m"
gray"\u001b[90m"
grey"\u001b[90m"
brightRed"\u001b[91m"
brightGreen"\u001b[92m"
brightYellow"\u001b[93m"
brightBlue"\u001b[94m"
brightMagenta"\u001b[95m"
brightCyan"\u001b[96m"
brightWhite"\u001b[97m"

Defined in

src/style.ts:11


StringStyle

Const StringStyle: ZodObject<{ bold: ZodOptional<ZodBoolean> ; underline: ZodOptional<ZodBoolean> ; color: ZodOptional<ZodEnum<{ red: "red" ; green: "green" ; yellow: "yellow" ; blue: "blue" ; magenta: "magenta" ; cyan: "cyan" ; white: "white" ; gray: "gray" ; grey: "grey" ; brightRed: "brightRed" ; brightGreen: "brightGreen" ; brightYellow: "brightYellow" ; brightBlue: "brightBlue" ; brightMagenta: "brightMagenta" ; brightCyan: "brightCyan" ; brightWhite: "brightWhite" }>> ; reset: ZodOptional<ZodDefault<ZodBoolean>> }, $strip>

Defined in

src/style.ts:32

src/style.ts:39

Functions

format

format(string, style?): string

Parameters

NameType
stringstring
styleObject
style.bold?boolean
style.underline?boolean
style.color?$InferEnumOutput<{ red: "red" ; green: "green" ; yellow: "yellow" ; blue: "blue" ; magenta: "magenta" ; cyan: "cyan" ; white: "white" ; gray: "gray" ; grey: "grey" ; brightRed: "brightRed" ; brightGreen: "brightGreen" ; brightYellow: "brightYellow" ; brightBlue: "brightBlue" ; brightMagenta: "brightMagenta" ; brightCyan: "brightCyan" ; brightWhite: "brightWhite" }>
style.reset?boolean

Returns

string

Defined in

src/style.ts:41


stripStyle

stripStyle(string): string

Parameters

NameType
stringstring

Returns

string

Defined in

src/style.ts:50