# typed-errors

> Create custom error types that work with `instanceof` and have stack traces

Latest version **1.1.0** (published 2016-05-06) · BSD-2-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install typed-errors
pnpm add typed-errors
yarn add typed-errors
bun add typed-errors
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-05-06 |
| First published | 2016-04-30 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | gmarceau, paulmelnikow, qmaurmann |

## Links

- npm: https://www.npmjs.com/package/typed-errors
- Repository: https://github.com/bodylabs/typed-errors
- Homepage: https://github.com/bodylabs/typed-errors#readme
- Issues: https://github.com/bodylabs/typed-errors/issues
- npm.io page: https://npm.io/package/typed-errors

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ^1.8.3

## Recent versions

- 1.1.0 (latest) — 2016-05-06
- 1.0.1 — 2016-04-30
- 1.0.0 — 2016-04-30

## README

# typed-errors

Create custom error types that work with `instanceof` and have stack traces.


Usage
-----

Consider the following from our tests:

```js
require('should');
var makeTypedError = require('typed-errors').makeTypedError;
var FooException = makeTypedError('FooException');

it('should be an instanceof', function () {
    try {
        throw new FooException('Foobar!');
    } catch (e) {
        e.should.be.an.instanceof(FooException);
        e.should.be.an.instanceof(Error);
    }
});
```

Installation
------------

```console
npm install typed-errors
```


Contribute
----------

- Issue Tracker: github.com/bodylabs/typed-errors/issues
- Source Code: github.com/bodylabs/typed-errors

Pull requests welcome!


Support
-------

If you are having issues, please let us know.


License
-------

The project is licensed under the two-clause BSD license.

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