_.isError

_.isError(value)

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

Since

3.0.0

Arguments

  1. value (*): The value to check.

Returns

(boolean): Returns true if value is an error object, else false.

Example

_.isError(new Error);
// => true
 
_.isError(Error);
// => false
doc_Lodash
2016-11-27 16:38:05
Comments
Leave a Comment

Please login to continue.