error-with-object

1.1.0 • Public • Published

error-with-object

Build Status David DM GitHub code size in bytes GitHub package.json version GitHub

The inbuilt Error class but that accepts objects

Example Usage

const ErrorWithObject = require('error-with-object');
throw new ErrorWithObject({
  message: 'Something went wrong',
  code: 'SOMETHING_WENT_WRONG',
  anythingElse: 'no'
});

License

This project is licensed under the terms of the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i error-with-object

Weekly Downloads

143

Version

1.1.0

License

MIT

Unpacked Size

3.29 kB

Total Files

6

Last publish

Collaborators

  • markwylde