Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

is-error

v4.17.11arrow_drop_down
v4.17.11
STATUS
Passing
DOWNLOADS
39
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
1 KB
subject
Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, or `URIError` object.
1 contributor
Use is-error in your project ?
Copied
npm i @bit/lodash.lodash.is-error
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
isError(new Error());
modifieddraft
chevron_left
chevron_right
isError (
value:*
) : boolean

Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError object.

Example
_.isError(new Error);
// => true

_.isError(Error);
// => false
Argument
value: *

The value to check.

Returns
boolean

Returns `true` if `value` is an error object, else `false`.