@xyz/whois
Version:
A powerful TypeScript/JavaScript tool for comprehensive domain analysis, featuring detailed WHOIS data with registration dates, registrars, and domain status. Offers SSL certificate extraction (with PEM support), DNS records, and server details. Includes
26 lines (25 loc) • 1.02 kB
TypeScript
/**
* Mapping of TLDs to their WHOIS servers
*
* This mapping contains WHOIS servers for various TLDs (Top-Level Domains).
* The servers are organized into several categories:
* - Generic TLDs (gTLDs) like .com, .net, .org
* - Sponsored TLDs like .edu, .gov, .mil
* - Country Code TLDs (ccTLDs) like .uk, .de, .fr
* - New gTLDs like .app, .dev, .page
*
* Each entry maps a TLD to its corresponding WHOIS server.
* The 'default' entry is used as a fallback when no specific server is found.
*/
export declare const WHOIS_SERVERS: Record<string, string>;
/**
* Gets the appropriate WHOIS server for a domain
*
* This function extracts the TLD from the domain and returns the corresponding
* WHOIS server from the WHOIS_SERVERS mapping. If no specific server is found
* for the TLD, it returns the default WHOIS server (whois.iana.org).
*
* @param domain The domain to get the WHOIS server for
* @returns The WHOIS server hostname
*/
export declare function getWhoisServer(domain: string): string;