MCPcopy
hub / github.com/stackryze/FreeDomains / buildWhoisText

Function buildWhoisText

src/pages/Whois.jsx:47–68  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

45 };
46
47 const buildWhoisText = (d) => {
48 const lines = [
49 `Domain Name: ${d.domainName.toUpperCase()}`,
50 `Registrar WHOIS Server: ${d.registrarWhoisServer}`,
51 `Registrar URL: ${d.registrarUrl}`,
52 `Creation Date: ${formatDate(d.createdAt)}`,
53 `Registry Expiry Date: ${formatDate(d.expiresAt)}`,
54 `Updated Date: ${formatDate(d.updatedAt)}`,
55 `Registrar: ${d.registrar}`,
56 `Registrar Abuse Contact Email: ${d.registrarAbuseEmail}`,
57 `Domain Status: ${d.domainStatus}`,
58 `Registrant Name: ${d.registrantName}`,
59 `Registrant Email: ${d.registrantEmail}`,
60 `Registrant Address: ${d.registrantAddress}`,
61 `Registrant Phone: ${d.registrantPhone}`,
62 ...d.nameservers.map((ns) => `Name Server: ${ns}`),
63 `DNSSEC: ${d.dnssec}`,
64 ``,
65 `>>> Last update of WHOIS database: ${formatDate(new Date().toISOString())} <<<`,
66 ];
67 return lines.join("\n");
68 };
69
70 const handleCopy = () => {
71 if (!result) return;

Callers 1

handleCopyFunction · 0.85

Calls 1

formatDateFunction · 0.70

Tested by

no test coverage detected