@technobuddha/library
Version:
A large library of useful functions
16 lines (15 loc) • 415 B
TypeScript
/**
* Determines whether the given string is a valid domain name.
*
* @param text - The string to test as a domain name.
* @returns `true` if the string is a valid domain name, otherwise `false`.
*
* @example
* ```typescript
* isDomain("example.com"); // true
* isDomain("not a domain"); // false
* ```
* @group RegExp
* @category Validation
*/
export declare function isDomain(text: string): boolean;