UNPKG

awesome-ajv-errors

Version:
24 lines (23 loc) 675 B
import chalk, { supportsColor } from "chalk"; import terminalLink from "terminal-link"; const { dim, red, blue, green, yellow, magenta, white, } = chalk; const styles = { title: red.bold, pathDescription: blue.italic, expr: white.italic, type: blue.bold, string: green, number: magenta, primitive: yellow, dimmed: dim, good: green, operator: white, link: blue, regex: magenta.italic }; const style = {}; for (const key of Object.keys(styles)) style[key] = (text) => styles[key](text); const support = Boolean(supportsColor && supportsColor.hasBasic); export const managerOptions = { support, terminalLink, style };