Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6
Check if a value is an error constructor
License
NotificationsYou must be signed in to change notification settings
sindresorhus/is-error-constructor
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Check if a value is an error constructor
$ npm install is-error-constructorimportisErrorConstructorfrom'is-error-constructor';isErrorConstructor(Error);//=> trueisErrorConstructor(RangeError);//=> truefunctionFakeError(){}isErrorConstructor(FakeError);//=> falseclassUnicornErrorextendsError{}isErrorConstructor(UnicornError);//=> true
- is - Type check values
About
Check if a value is an error constructor
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.