Skip to main content
Module

x/nanocolors/index.d.ts

2x times faster than chalk and use 5x less space in node_modules
Latest
File
export type Color = (text: string | number) => string
export interface Colors { isColorSupported: boolean reset: Color bold: Color dim: Color italic: Color underline: Color inverse: Color hidden: Color strikethrough: Color black: Color red: Color green: Color yellow: Color blue: Color magenta: Color cyan: Color white: Color gray: Color bgBlack: Color bgRed: Color bgGreen: Color bgYellow: Color bgBlue: Color bgMagenta: Color bgCyan: Color bgWhite: Color}
export const isColorSupported: booleanexport function createColors(enabled?: boolean): Colorsexport const reset: Colorexport const bold: Colorexport const dim: Colorexport const italic: Colorexport const underline: Colorexport const inverse: Colorexport const hidden: Colorexport const strikethrough: Colorexport const black: Colorexport const red: Colorexport const green: Colorexport const yellow: Colorexport const blue: Colorexport const magenta: Colorexport const cyan: Colorexport const white: Colorexport const gray: Colorexport const bgBlack: Colorexport const bgRed: Colorexport const bgGreen: Colorexport const bgYellow: Colorexport const bgBlue: Colorexport const bgMagenta: Colorexport const bgCyan: Colorexport const bgWhite: Color