tldextract
Accurately separates the gTLD or ccTLD (generic or country code top-level domain) from the registered domain and subdomains of a URL.
How does it work?
var tldextract = ;;;
tests
make
Disclaimer
This module is a port of the python module tldextract.