Checks if two Error objects are the same.
Error
The first value to compare.
The reference Error.
true if the errors are the same, false otherwise.
true
false
if ref is not an Error.
ref
isEqualErr(new Error('test'), new Error('test')) => trueisEqualErr(new Error('test'), new TypeError('test')) => falseisEqualErr(new Error('test'), new Error('other')) => false Copy
isEqualErr(new Error('test'), new Error('test')) => trueisEqualErr(new Error('test'), new TypeError('test')) => falseisEqualErr(new Error('test'), new Error('other')) => false
Checks if two
Errorobjects are the same.