MCPcopy Create free account
hub / github.com/cmliu/CF-Workers-CheckProxyIP / normalizeTxtValue

Function normalizeTxtValue

_worker.js:241–247  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

239}
240
241function normalizeTxtValue(value) {
242 const text = String(value ?? '').trim();
243 if (text.startsWith('"') && text.endsWith('"')) {
244 return text.slice(1, -1).replace(/\\"/g, '"');
245 }
246 return text.replace(/\\"/g, '"');
247}
248
249async function dohQuery(name, type, endpoint = 'https://cloudflare-dns.com/dns-query') {
250 const startedAt = performance.now();

Callers 2

handleResolveFunction · 0.85
dohQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected