Skip to content

mk-pmb/is-error-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Detect whether a value is an error

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •