MCPcopy
hub / github.com/SukkaW/Surge / getMethods

Function getMethods

Build/lib/is-domain-alive.ts:58–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56const registerableDomainResultCache = new Map();
57
58export async function getMethods() {
59 const customWhoisServersMapping = await (await ($$fetch('https://cdn.jsdelivr.net/npm/whois-servers-list@latest/list.json'))).json() as any;
60
61 const isRegisterableDomainAlive = createRegisterableDomainAliveChecker({
62 dns: {
63 dnsServers,
64 maxAttempts: 6,
65 customFetchForDoH: fetchForDoH as typeof fetch
66 },
67 registerableDomainResultCache,
68 whois: {
69 customWhoisServersMapping
70 }
71 });
72
73 const isDomainAlive = createDomainAliveChecker({
74 dns: {
75 dnsServers,
76 maxAttempts: 6,
77 customFetchForDoH: fetchForDoH as typeof fetch
78 },
79 registerableDomainResultCache,
80 resultCache,
81 whois: {
82 customWhoisServersMapping
83 }
84 });
85
86 return { isRegisterableDomainAlive, isDomainAlive };
87};

Callers 1

Calls 1

$$fetchFunction · 0.90

Tested by

no test coverage detected