method TldUtils.getPublicSuffix
TldUtils.getPublicSuffix(domain: string): string | null

Gets the public suffix of a domain. Returns the TLD or multi-part suffix (e.g., 'co.uk').

Parameters

domain: string

Return Type

string | null

Usage

import { TldUtils } from ".";