tldextract

Extract domain, subdomain and tld from a url

npm install tldextract
154 downloads in the last day
1 031 downloads in the last week
3 245 downloads in the last month
npm loves you