Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bigpipe/pruddy-error
- Owner: bigpipe
- License: other
- Created: 2016-03-23T08:42:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-23T12:07:38.000Z (over 4 years ago)
- Last Synced: 2024-09-18T11:32:31.894Z (about 2 months ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.
})
```