url-to-domain
ai-research-agent / extractor/html-to-cite/url-to-domain
Functions
convertURLToDomain()
function convertURLToDomain(domain): string
Extract TLD and hostname from domain in Regex. There's two or more part TLDs so it is hard to tell if host.secondTLD.tld or host.tld is correct way to get root domain (e.g. abc.go.jp, abc.co.uk)
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
string
rootDomain