Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check if a value is an error constructor

License

NotificationsYou must be signed in to change notification settings

sindresorhus/is-error-constructor

Check if a value is an error constructor

Install

$ npm install is-error-constructor

Usage

importisErrorConstructorfrom'is-error-constructor';isErrorConstructor(Error);//=> trueisErrorConstructor(RangeError);//=> truefunctionFakeError(){}isErrorConstructor(FakeError);//=> falseclassUnicornErrorextendsError{}isErrorConstructor(UnicornError);//=> true

Related

  • is - Type check values

About

Check if a value is an error constructor

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp