MCPcopy Create free account
hub / github.com/pollinations/pollinations / cf

Function cf

apps/_scripts/deploy-app.js:54–63  ·  view source on GitHub ↗
(url, headers, init = {})

Source from the content-addressed store, hash-verified

52});
53
54async function cf(url, headers, init = {}) {
55 const res = await fetch(url, { headers, ...init });
56 let json = {};
57 try {
58 json = await res.json();
59 } catch {
60 // Some DELETE responses are empty.
61 }
62 return { ok: res.ok && json.success !== false, json };
63}
64
65const hasCode = (json, ...codes) =>
66 json.errors?.some((error) => codes.includes(error.code));

Callers 10

resolveZoneIdFunction · 0.70
createPagesProjectFunction · 0.70
getPagesProjectFunction · 0.70
detachPagesDomainFunction · 0.70
projectHasPagesDomainFunction · 0.70
postDomainFunction · 0.70
upsertCnameFunction · 0.70
deleteCnameFunction · 0.70
attachWorkerDomainFunction · 0.70

Calls 2

jsonMethod · 0.80
fetchFunction · 0.50

Tested by

no test coverage detected