You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
6 years ago | |
|---|---|---|
| .. | ||
| test | 6 years ago | |
| LICENSE | 6 years ago | |
| README.md | 6 years ago | |
| index.js | 6 years ago | |
| package.json | 6 years ago | |
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