@pronix/hyper-flow
Version:
Framework for building progressive console applications on node.js platform
7 lines (6 loc) • 332 B
text/typescript
import chalk from 'chalk'
export const error = (message: string, type: number | string): string => `
${ chalk.red.bold(`[error] ${ typeof type === 'string' && `type:` || typeof type === 'number' && 'code:' } ${ chalk.reset.italic.redBright(type) }`) }
${ chalk.yellow.bold('message:')} ${ message }
`
export default { error }