pretty-stack

Pretty Stack Trace to stdout in TTY. Use clean-stack of sindresorhus under the hood to improve the whole experience.
Requirements
Getting Started
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @slimio/pretty-stack
$ yarn add @slimio/pretty-stack
Usage example
const prettyStack = require("@slimio/pretty-stack");
const err = new Error("hello world!");
prettyStack(err, true);
prettyStack(err.stack, false);
API
prettyStack(error: Error | string | string[], printFile?: boolean): void
This method can handle many input types. In case the input is a string it will be splitted by \n
.
Dependencies
Name | Refactoring | Security Risk | Usage |
---|
clean-stack | Minor | Low | Cleanup Javascript stack-trace |
kleur | Minor | Low | The fastest Node.js library for formatting terminal text with ANSI colors~! |
License
MIT