codeql-action/node_modules/is-error
github-actions[bot] 0da815296a Update checked-in dependencies 2022-02-24 17:03:29 +00:00
..
test replace jest with ava 2020-05-13 11:13:27 +01:00
.jshintrc replace jest with ava 2020-05-13 11:13:27 +01:00
.travis.yml replace jest with ava 2020-05-13 11:13:27 +01:00
LICENSE replace jest with ava 2020-05-13 11:13:27 +01:00
README.md replace jest with ava 2020-05-13 11:13:27 +01:00
index.js replace jest with ava 2020-05-13 11:13:27 +01:00
package.json Update checked-in dependencies 2022-02-24 17:03:29 +00:00

README.md

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