JSPM

error-render

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q29296F

Prettify the details of the errors in the console.

Package Exports

  • error-render

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (error-render) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

error-render

Actual version published on NPM Dependencies

Install

npm install error-render --save

Usage

var er    = require('error-render');
var error = new Error('Whoops !');

// pretty error with the details (metadata)
console.error(er.details(error));

// shortcut of console.error(er.details(error));
er.log(error)

Pretty JSON

er.prettyJson(error);

Pretty error without the metadata of the error instance

var pe = new er.PrettyError();

console.error(pe.render(error));

Provided by pretty-error

Unit tests

error-render is tested with Unit.js

Run the tests

cd node_modules/error-render

npm test

LICENSE

MIT license

Author

Nicolas Tallefourtane - Nicolab.net
Nicolas Talle
Make a donation via Paypal