# express-bang

> Expressjs middlware to send response with http-friendly object

Latest version **0.2.0** (published 2023-11-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install express-bang
pnpm add express-bang
yarn add express-bang
bun add express-bang
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-11-25 |
| First published | 2023-11-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 87.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nakkashit |
| Maintainers | tanishqsingla |

## Links

- npm: https://www.npmjs.com/package/express-bang
- Repository: https://github.com/Nakkashit/express-bang
- Homepage: https://github.com/Nakkashit/express-bang#readme
- Issues: https://github.com/Nakkashit/express-bang/issues
- npm.io page: https://npm.io/package/express-bang

## Recent versions

- 0.2.0 (latest) — 2023-11-25
- 0.1.2 — 2023-11-25
- 0.1.1 — 2023-11-24

## README

# express-bang
Send http-friendly error objects in express.

## Install
```sh
npm install --save express-bang
```

## Usage

```js
// commonJS
const expressBang = require('express-bang');

// ESM
import expressBang from 'express-bang';

app.use(expressBang());


app.get("/test", (req, res) => {
    res.bang.badRequest("Internal Server Error");
});
```

## Why expressbang?
The package is heavily inspired from boom error objects and express middleware package called - [express-boom](https://www.npmjs.com/package/express-boom).
Unlike `express-boom`, `express-bang` is a standalone implementation and doesn't depend on any third-party package for getting methods.

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