【文件属性】:
文件名称:youch-terminal:在终端上显示Youch错误消息
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-04 05:34:56
JavaScript
尤希码头
此程序包将错误消息转换为要在终端上显示的字符串。 该函数的输出使用着色。
安装
npm i youch-terminal
用法
请确保您通过输出toJSON到youch终端功能。
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 ) )
} )
【文件预览】:
youch-terminal-develop
----example.js(542B)
----README.md(671B)
----.editorconfig(207B)
----.gitignore(77B)
----index.js(4KB)
----CHANGELOG.md(236B)
----package-lock.json(2KB)
----package.json(643B)