JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9523
  • Score
    100M100P100Q131872F
  • License BSD

Prettify given error object

Package Exports

  • pruddy-error
  • pruddy-error/failing-code

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 (pruddy-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

This is a clone of the `prettify-error` module which was unpublished by the
author. All dependencies have been inlined to prevent future conflicts.

pruddy-error

Prettify given error objects for console outputs

Install

$ npm install pruddy-error

Usage

var pruddy = require('pruddy-error');
var error = new Error('lorem ipsum');

console.error(pruddy(error) || error);

If you'd like to skip some lines from the stack:

pruddy(error, {
  shift: 2  // Will start reading the stack from the third line.
})