Bump to v4.4.0.

This commit is contained in:
John-David Dalton
2016-02-15 20:35:27 -08:00
parent e2aef0def9
commit 91d3468c81
115 changed files with 1019 additions and 654 deletions

View File

@@ -30,8 +30,12 @@ var objectToString = objectProto.toString;
* // => false
*/
function isError(value) {
return isObjectLike(value) &&
typeof value.message == 'string' && objectToString.call(value) == errorTag;
if (!isObjectLike(value)) {
return false;
}
var Ctor = value.constructor;
return (objectToString.call(value) == errorTag) ||
(typeof Ctor == 'function' && objectToString.call(Ctor.prototype) == errorTag);
}
module.exports = isError;