format-stack

2019-08-15 admin

format-stack是什么

什么是format-stack,Formats a stack with colors

format-stack使用教程帮助文档

format-stack

Formats a stack with colors

This module must be required as the first thing before everything else. It will format your stack trace with colors and will also print the previous stack.

Be warned this uses trycatch so it will enable domains and monkey patch everything to implement long stack traces.

format-stack-example

Example

require("format-stack").set({
  traces: 'short' // 'long' works too, maybe.. ;)
});

// Any thrown error will now have a pretty printed stack
// trace.

Installation

npm install format-stack

Tests

npm test

Contributors

  • Raynos

MIT Licenced

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72599.html

文章标题:format-stack

回到顶部