Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError object.
value
Error
EvalError
RangeError
ReferenceError
SyntaxError
TypeError
URIError
The value to check.
Returns true if value is an error object, else false.
true
false
5.6.0
isError(new Error)// => trueisError(Error)// => false Copy
isError(new Error)// => trueisError(Error)// => false
Checks if
value
is anError
,EvalError
,RangeError
,ReferenceError
,SyntaxError
,TypeError
, orURIError
object.