wallet-core/node_modules/is-error
2017-05-28 00:40:43 +02:00
..
test add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
.jshintrc add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
.npmignore add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
.travis.yml add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
index.js add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
LICENSE add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
package.json add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
README.md add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00

is-error

Detect whether a value is an error

Example

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

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

Docs

var bool = isError(maybeErr)

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