# exploder

> Express port of Boom

Latest version **1.0.0** (published 2017-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install exploder
pnpm add exploder
yarn add exploder
bun add exploder
```

## 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.0.0 |
| Published | 2017-05-27 |
| First published | 2016-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Continuation Labs |
| Maintainers | cjihrig |
| Keywords | boom, express, hapi, error, errors, http |

## Links

- npm: https://www.npmjs.com/package/exploder
- Repository: https://github.com/continuationlabs/exploder
- Issues: https://github.com/continuationlabs/exploder/issues
- npm.io page: https://npm.io/package/exploder

## Dependencies (1)

- [boom](https://npm.io/package/boom.md) 5.x.x

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-05-27
- 0.2.0 — 2016-09-02
- 0.1.0 — 2016-08-31

## README

# exploder

[![Current Version](https://img.shields.io/npm/v/exploder.svg)](https://www.npmjs.org/package/exploder)
[![Build Status via Travis CI](https://travis-ci.org/continuationlabs/exploder.svg?branch=master)](https://travis-ci.org/continuationlabs/exploder)
![Dependencies](http://img.shields.io/david/continuationlabs/exploder.svg)

[![belly-button-style](https://cdn.rawgit.com/continuationlabs/belly-button/master/badge.svg)](https://github.com/continuationlabs/belly-button)

HTTP-friendly error objects. This is a port of [hapi](https://www.npmjs.com/package/hapi)'s [boom](https://www.npmjs.com/package/boom) module as [express](https://www.npmjs.com/package/express) middleware. It is based on [express-boom](https://www.npmjs.com/package/express-boom).

## Example

```javascript
const Express = require('express');
const Exploder = require('exploder');

const app = Express();

app.use(Exploder());

app.use(function (req, res) {
  res.boom.notFound(); // Responds with a 404 status code
});
```

## API

For a complete list of methods offered by boom, see the [boom](https://www.npmjs.com/package/boom) documentation.

`exploder` also provides the following options when setting up the middleware:

- `format(err)` (function) - A function that formats the boom error before replying to the client. This only applies to functions that send a response to the client (i.e. not `wrap()` or `create()`). By default, the boom error's `output.payload` is sent as the response payload. If a `format()` function is provided, the complete boom error is passed as the only argument, and the return value is sent as the response payload.

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