error-replacer

1.0.0 • Public • Published

error-replacer

Drop this into the replacer argument in JSON.stringify and you will get meaningful JSON serialization of Error objects.

const errorReplacer = require('error-replacer');
 
// basicsOnly - say true (default) if you only want Error type and message, no stack or file details
JSON.stringify(something, errorReplacer(basicsOnly));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i error-replacer

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Last publish

Collaborators

  • bchociej