# error-with-object

> The inbuilt Error class but that accepts objects

Latest version **1.1.0** (published 2019-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-with-object
pnpm add error-with-object
yarn add error-with-object
bun add error-with-object
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-11-20 |
| First published | 2019-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | markwylde |

## Links

- npm: https://www.npmjs.com/package/error-with-object
- npm.io page: https://npm.io/package/error-with-object

## Recent versions

- 1.1.0 (latest) — 2019-11-20
- 1.0.0 — 2019-11-19

## README

# error-with-object
[![Build Status](https://travis-ci.org/markwylde/error-with-object.svg?branch=master)](https://travis-ci.org/markwylde/error-with-object)
[![David DM](https://david-dm.org/markwylde/error-with-object.svg)](https://david-dm.org/markwylde/error-with-object)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/markwylde/error-with-object)
[![GitHub package.json version](https://img.shields.io/github/package-json/v/markwylde/error-with-object)](https://github.com/markwylde/error-with-object/releases)
[![GitHub](https://img.shields.io/github/license/markwylde/error-with-object)](https://github.com/markwylde/error-with-object/blob/master/LICENSE)

The inbuilt Error class but that accepts objects

## Example Usage
```javascript
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.

---
_Source: https://npm.io/package/error-with-object · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
