(code: string, value: string)
| 29 | const USE_COLOR = colorEnabled() |
| 30 | |
| 31 | function wrap(code: string, value: string): string { |
| 32 | if (!USE_COLOR || !value) return value |
| 33 | return `${code}${value}${RESET}` |
| 34 | } |
| 35 | |
| 36 | const bold = (s: string): string => wrap('\x1b[1m', s) |
| 37 | const dim = (s: string): string => wrap('\x1b[2m', s) |