Package Exports
- is-typeof-error
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-typeof-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
is-typeof-error

Check that given value is any type of error and instanceof Error
Install
npm i is-typeof-error --save
npm test
Usage
For more use-cases see the tests
var isError = require('is-typeof-error')
var KindError = require('kind-error')
var PluginError = require('plugin-error')
var CustomClass = function () {}
CustomClass.prototype.foo = function () {}
isError(new TypeError('test')) //=> true
isError(new SyntaxError('test')) //=> true
isError(new SyntaxError('test')) //=> true
isError(new PluginError('test', 'msg')) //=> true
isError(new CustomClass('test')) //=> false
isError(new Object({a: 'b'})) //=> false
isError(new RegExp('test')) //=> false
isError(Object.create({a: 'b'})) //=> false
isError(/regex/) //=> false
isError({a: 'b'}) //=> false
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.