(url, headers = {})
| 30 | } |
| 31 | |
| 32 | async function requestJson(url, headers = {}) { |
| 33 | const response = await fetch(url, { headers }) |
| 34 | |
| 35 | if (!response.ok) { |
| 36 | throw new Error(`${response.status} ${response.statusText}`) |
| 37 | } |
| 38 | |
| 39 | return response.json() |
| 40 | } |
| 41 | |
| 42 | function parseRepo(repository) { |
| 43 | const url = new URL(repository) |
no outgoing calls
no test coverage detected