Youch terminal
This package converts the youch error message to a string to be displayed on terminal. The output of the function is colorized using chalk.
Install
npm i youch-terminal
Usage
Make sure you pass the output toJSON
to the youch terminal function.
const Youch = require('youch')
const forTerminal = require('youch-terminal')
const error = new Error('Some weird error')
const jsonResponse = await new Youch(error, {}).toJSON()
const options = {
displayShortPath: false,
prefix: '',
hideErrorTitle: false
hideMessage: false
displayMainFrameOnly: false
}
console.log(forTerminal(output, options))