0.4.2 • Published 5 years ago

@slimio/pretty-stack v0.4.2

Weekly downloads
16
License
MIT
Repository
github
Last release
5 years ago

pretty-stack

version Maintenance MIT dep size known vulnerabilities Build Status Greenkeeper badge

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
# or
$ yarn add @slimio/pretty-stack

Usage example

const prettyStack = require("@slimio/pretty-stack");

const err = new Error("hello world!");
prettyStack(err, true);
// or go with the stack array
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

NameRefactoringSecurity RiskUsage
clean-stackMinorLowCleanup Javascript stack-trace
kleurMinorLowThe fastest Node.js library for formatting terminal text with ANSI colors~!

License

MIT

0.4.2

5 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago