Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bigpipe/pruddy-error

Prettify given error object
https://github.com/bigpipe/pruddy-error

Last synced: 1 day ago
JSON representation

Prettify given error object

Awesome Lists containing this project

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

![](https://i.cloudup.com/Vt6PAM3yDA.png)

## Install

```
$ npm install pruddy-error
```

## Usage

```js
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:

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