MCPcopy
hub / github.com/lissy93/web-check / safe

Function safe

api/dns.js:7–7  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

5const dnsHandler = async (url) => {
6 const { hostname } = parseTarget(url);
7 const safe = (fn) => fn.catch(() => []);
8 const [a, aaaa, mx, txt, ns, cname, soa, srv, ptr] = await Promise.all([
9 safe(dns.resolve4(hostname)),
10 safe(dns.resolve6(hostname)),

Callers 1

dnsHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected