@c0b41/prettify-errordeprecated

Prettify given error objects for console outputs

Usage no npm install needed!

<script type="module">
  import c0b41PrettifyError from 'https://cdn.skypack.dev/@c0b41/prettify-error';
</script>

README

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.