{"size": 287, "ext": "js", "max_stars_repo_path": "012.axios/lib/helpers/isAxiosError.js", "max_stars_repo_name": "haiweilian/tinylib-analysis", "max_stars_repo_stars_event_min_datetime": "2021-11-07T13:58:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-13T06:03:43.000Z", "max_issues_repo_path": "lib/helpers/isAxiosError.js", "max_issues_repo_name": "MageeLin/axios-source-code-analysis", "max_issues_repo_issues_event_min_datetime": "2021-11-07T13:53:30.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T10:27:12.000Z", "max_forks_repo_path": "lib/helpers/isAxiosError.js", "max_forks_repo_name": "MageeLin/axios-source-code-analysis", "max_forks_repo_forks_event_min_datetime": "2021-12-23T11:57:32.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-23T11:57:32.000Z"}
{"max_stars_count": 6, "max_issues_count": 14, "max_forks_count": 1, "avg_line_length": 22.0769230769, "max_line_length": 74, "alphanum_fraction": 0.6933797909}
'use strict';

/**
 * 判断error是否为Axios抛出的
 *
 * @param {*} payload 要检测的error
 * @returns {boolean} 如果error为Axios抛出的则返回true，否则返回false
 */
module.exports = function isAxiosError(payload) {
  // 通过isAxiosError来判断
  return (typeof payload === 'object') && (payload.isAxiosError === true);
};
