{"size": 281, "ext": "js", "max_stars_repo_path": "client/src/fetch.js", "max_stars_repo_name": "efokschaner/ryustar", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/fetch.js", "max_issues_repo_name": "efokschaner/ryustar", "max_issues_repo_issues_event_min_datetime": "2021-03-09T09:46:47.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-09T14:54:26.000Z", "max_forks_repo_path": "client/src/fetch.js", "max_forks_repo_name": "efokschaner/ryustar", "max_forks_repo_forks_event_min_datetime": "2017-12-31T02:04:05.000Z", "max_forks_repo_forks_event_max_datetime": "2017-12-31T02:04:05.000Z"}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": 1, "avg_line_length": 28.1, "max_line_length": 82, "alphanum_fraction": 0.6868327402}

export async function fetchJson (url, fetchOptions) {
  let response = await fetch(url, fetchOptions)
  if (!response.ok) {
    let errorText = await response.text()
    throw new Error(`HTTP ${response.status} from ${response.url} : ${errorText}`)
  }
  return response.json()
}
