JSPM

@slimio/pretty-stack

0.4.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q51689F
  • License MIT

Pretty Stack Trace to stdout in TTY

Package Exports

  • @slimio/pretty-stack

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@slimio/pretty-stack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

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