MCPcopy Index your code
hub / github.com/FirefoxCSS-Store/FirefoxCSS-Store.github.io / requestJson

Function requestJson

scripts/repository-stats.mjs:32–40  ·  view source on GitHub ↗
(url, headers = {})

Source from the content-addressed store, hash-verified

30}
31
32async 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
42function parseRepo(repository) {
43 const url = new URL(repository)

Callers 3

readGithubFunction · 0.85
readGitlabFunction · 0.85
readCodebergFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected