UNPKG

log-symbols

Version:

Colored symbols for various log levels. Example: `✔︎ Success`

15 lines (12 loc) 426 B
import { blue, green, yellow, red, } from 'yoctocolors'; import isUnicodeSupported from 'is-unicode-supported'; const _isUnicodeSupported = isUnicodeSupported(); export const info = blue(_isUnicodeSupported ? 'ℹ' : 'i'); export const success = green(_isUnicodeSupported ? '✔' : '√'); export const warning = yellow(_isUnicodeSupported ? '⚠' : '‼'); export const error = red(_isUnicodeSupported ? '✖' : '×');