parse-domain

Splits a hostname into subdomains, domain and (effective) top-level domains

Browse on unpkg