Files

10 lines
459 B
TypeScript

/**
* A simple test to determine if a hostname is a properly-formatted domain name
*
* A "valid domain" is defined here: https://url.spec.whatwg.org/#valid-domain
*
* Regex was originally sourced from here, then remixed to add punycode support:
* https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html
*/
export declare function isValidDomain(hostname: string): boolean;
//# sourceMappingURL=isValidDomain.d.ts.map