package
Detect whether a value is an error
npm install is-errorGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
6.1 kB
Includes dependencies.
Detect whether a value is an error
var isError = require("is-error");
console.log(isError(new Error('hi'))) // true
console.log(isError({ message: 'hi' })) // falsevar bool = isError(maybeErr)is-error := (maybeErr: Any) => BooleanisError returns a boolean. it will detect whether the argument
is an error or not.
npm install is-error
npm test
kriskowal
kris.kowal@cixar.com