tldts
Library to work against complex domain names, subdomains and URIs.
parse-domain
Splits a hostname into subdomains, domain and (effective) top-level domains
tldts-icann
Library to work against complex domain names, subdomains and URIs. Only contains ICANN section.