# 2e

> two-types and chain errors for user and bug

Latest version **1.0.0** (published 2015-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install 2e
pnpm add 2e
yarn add 2e
bun add 2e
```

## 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 | 2015-09-25 |
| First published | 2015-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kiliwalk |
| Maintainers | kiliwalk |
| Keywords | chain errors, two-types errors, bug, user, error, fault, exception, error code |

## Links

- npm: https://www.npmjs.com/package/2e
- Repository: https://github.com/kiliwalk/2e
- Issues: https://github.com/kiliwalk/2e/issues
- npm.io page: https://npm.io/package/2e

## 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) — 2015-09-25

## README

two-types and chain errors for user and bug in node
=================================

```js
var e2 = require('2e'), UserError = e2.UserError, BugError = e2.BugError;
throw new UserError('xxx');
throw new UserError(400, 'xxx');
throw new UserError(err, 'xxx');//caused by another error `err`
throw new UserError(err, 400, 'xxx');
```

## License :

Licensed under MIT

Copyright (c) 2015 [kiliwalk](https://github.com/kiliwalk)

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