Skip to content

rootDomain

rootDomain(emailOrDomain): string | null

Defined in: src/classify/domain.ts:9

Registrable root domain of an address or host, public-suffix aware. ‘user@mail.amazon.co.uk’ -> ‘amazon.co.uk’ (the origin session’s naive last-two-labels split wrongly produced ‘co.uk’). Returns null for empty or single-label input.

string

string | null