@bracketed/logger
Version:
An alternative to your run-of-the-mill node console logging functions!
92 lines (90 loc) • 2.91 kB
TypeScript
declare const isColorSupported: boolean;
type Color = (text: string | number) => string;
interface Colorette {
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;
blackBright: Color;
redBright: Color;
greenBright: Color;
yellowBright: Color;
blueBright: Color;
magentaBright: Color;
cyanBright: Color;
whiteBright: Color;
bgBlackBright: Color;
bgRedBright: Color;
bgGreenBright: Color;
bgYellowBright: Color;
bgBlueBright: Color;
bgMagentaBright: Color;
bgCyanBright: Color;
bgWhiteBright: Color;
}
declare const createColors: ({ useColor }?: {
useColor?: boolean | undefined;
}) => Colorette;
declare const reset: Color;
declare const bold: Color;
declare const dim: Color;
declare const italic: Color;
declare const underline: Color;
declare const inverse: Color;
declare const hidden: Color;
declare const strikethrough: Color;
declare const black: Color;
declare const red: Color;
declare const green: Color;
declare const yellow: Color;
declare const blue: Color;
declare const magenta: Color;
declare const cyan: Color;
declare const white: Color;
declare const gray: Color;
declare const bgBlack: Color;
declare const bgRed: Color;
declare const bgGreen: Color;
declare const bgYellow: Color;
declare const bgBlue: Color;
declare const bgMagenta: Color;
declare const bgCyan: Color;
declare const bgWhite: Color;
declare const blackBright: Color;
declare const redBright: Color;
declare const greenBright: Color;
declare const yellowBright: Color;
declare const blueBright: Color;
declare const magentaBright: Color;
declare const cyanBright: Color;
declare const whiteBright: Color;
declare const bgBlackBright: Color;
declare const bgRedBright: Color;
declare const bgGreenBright: Color;
declare const bgYellowBright: Color;
declare const bgBlueBright: Color;
declare const bgMagentaBright: Color;
declare const bgCyanBright: Color;
declare const bgWhiteBright: Color;
export { type Color, type Colorette, bgBlack, bgBlackBright, bgBlue, bgBlueBright, bgCyan, bgCyanBright, bgGreen, bgGreenBright, bgMagenta, bgMagentaBright, bgRed, bgRedBright, bgWhite, bgWhiteBright, bgYellow, bgYellowBright, black, blackBright, blue, blueBright, bold, createColors, cyan, cyanBright, dim, gray, green, greenBright, hidden, inverse, isColorSupported, italic, magenta, magentaBright, red, redBright, reset, strikethrough, underline, white, whiteBright, yellow, yellowBright };