FunctionsExtractorHtml to cite
Url To Domain
ai-research-agent / extractor/html-to-cite/url-to-domain
convertURLToDomain()
function convertURLToDomain(domain: string): string;Defined in: src/extractor/html-to-cite/url-to-domain.js:10
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