UNPKG

whoiser

Version:

Whois info for domains, TLDs, IPs, and ASN

22 lines (21 loc) 668 B
/** * Split a string into two parts at a given index. * * @param string The string to split. * @param by The index at which to split the string. * @returns An array containing the two parts of the string. */ export declare function splitStringBy(string: string, by: number): [string, string]; /** * Check if a string is a valid TLD, and return it in canonical form. * * @param tld * @returns The normalized TLD * @throws If the TLD is invalid */ export declare function validatedTld(tld: string): string; /** * Check if a string is a valid domain format * @param domain The domain to check. */ export declare function isDomain(domain: string): boolean;