$ cnpm install 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.
npm i youch-terminal
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')
new Youch(error, {})
.toJSON()
.then((output) => {
console.log(forTerminal(output))
})
Copyright 2014 - 2016 © taobao.org |