https://github.com/azer/prettify-error
Prettify given error objects for console outputs
https://github.com/azer/prettify-error
Last synced: 11 months ago
JSON representation
Prettify given error objects for console outputs
- Host: GitHub
- URL: https://github.com/azer/prettify-error
- Owner: azer
- Created: 2014-03-15T05:59:32.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-06-05T10:50:22.000Z (about 10 years ago)
- Last Synced: 2024-11-28T17:48:30.790Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 29
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## prettify-error
Prettify given error objects for console outputs

## Install
```bash
$ npm install prettify-error
```
## Usage
```js
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:
```js
prettify(error, 2) // Will start reading the stack from the third line.
```