# is-error

> Detect whether a value is an error

Latest version **2.2.2** (published 2019-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-error
pnpm add is-error
yarn add is-error
bun add is-error
```

## 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 | 2.2.2 |
| Published | 2019-04-16 |
| First published | 2015-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Raynos |
| Maintainers | jcorbin, kriskowal, mk-pmb, raynos |

## Links

- npm: https://www.npmjs.com/package/is-error
- Repository: https://github.com/mk-pmb/is-error-js
- Issues: https://github.com/mk-pmb/is-error-js/issues
- npm.io page: https://npm.io/package/is-error

## Recent versions

- 2.2.2 (latest) — 2019-04-16
- 2.2.1 — 2016-10-21
- 2.2.0 — 2015-05-16
- 2.1.0 — 2015-05-10
- 2.0.0 — 2015-03-08

## README

# is-error

<!--
    [![build status][build-png]][build]
    [![Coverage Status][cover-png]][cover]
    [![Davis Dependency status][dep-png]][dep]
-->

<!-- [![NPM][npm-png]][npm] -->

Detect whether a value is an error

## Example

```js
var isError = require("is-error");

console.log(isError(new Error('hi'))) // true
console.log(isError({ message: 'hi' })) // false
```

## Docs

### `var bool = isError(maybeErr)`

```hs
is-error := (maybeErr: Any) => Boolean
```

`isError` returns a boolean. it will detect whether the argument
is an error or not.

## Installation

`npm install is-error`

## Tests

`npm test`

## Contributors

 - Raynos

## MIT Licensed

  [build-png]: https://secure.travis-ci.org/Raynos/is-error.png
  [build]: https://travis-ci.org/Raynos/is-error
  [cover-png]: https://coveralls.io/repos/Raynos/is-error/badge.png
  [cover]: https://coveralls.io/r/Raynos/is-error
  [dep-png]: https://david-dm.org/Raynos/is-error.png
  [dep]: https://david-dm.org/Raynos/is-error
  [npm-png]: https://nodei.co/npm/is-error.png?stars&downloads
  [npm]: https://nodei.co/npm/is-error

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