parse-domain
Splits a hostname into subdomains, domain and (effective) top-level domains
dnser
Dnser is a package for working with top-level domains.
html-segmentator
A small library for splitting an HTML string into its top-level sections. Based on html5parser.