Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Prettify given error objects for console outputs
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.npmignore
README.md
example.js
index.js
package.json

README.md

prettify-error

Prettify given error objects for console outputs

Install

$ npm install prettify-error

Usage

var prettify = require('prettify-error')
var err = new Error('lorem ipsum')

console.error(prettify(error) || error)

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

prettify(error, 2) // Will start reading the stack from the third line.
Something went wrong with that request. Please try again.