(value)
| 239 | } |
| 240 | |
| 241 | function 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 | |
| 249 | async function dohQuery(name, type, endpoint = 'https://cloudflare-dns.com/dns-query') { |
| 250 | const startedAt = performance.now(); |
no outgoing calls
no test coverage detected