aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-error/README.md
blob: a16c59ac3bffb48267b36862bf6a29e1fae5f99c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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