pruddy-error

Prettify given error object

BSD 6 个版本
安装
npm install pruddy-error
yarn add pruddy-error
pnpm add pruddy-error
bun add pruddy-error
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

Install

$ npm install pruddy-error

Usage

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:

pruddy(error, {
  shift: 2  // Will start reading the stack from the third line.
})
版本列表
2.0.2 2017-12-01
2.0.1 2017-12-01
2.0.0 2017-12-01
1.0.2 2016-07-29
1.0.1 2016-07-19
1.0.0 2016-03-23