lib/formatErrors.js
function isError(error) {
    return error && (Object.prototype.toString.call(error).slice(8, -1) === "Error" ||
        (typeof error.stack !== "undefined" && typeof error.name !== "undefined"));
}
function isError(error) {
    return error && (Object.prototype.toString.call(error).slice(8, -1) === "Error" ||
        (typeof error.stack !== "undefined" && typeof error.name !== "undefined"));
}
function isError ( error ) { return error && ( Object . prototype . toString . call ( error ) . slice ( 8 , - 1 ) === "Error" || ( typeof error . stack !== "undefined" && typeof error . name !== "undefined" ) ) ; }
Determine if a given parameter is an Error.

@method isError
@private
@param {Error} error the prospective Error
@return {Boolean} true is 'error' is an Error; false otherwise
Determine if a given parameter is an Error .