get-root-domain
v0.0.1
Published
Extract root domain name from an URL.
Downloads
407
Maintainers
Readme
Extract Price from String
Extract root domain name from an URL.
Installation
npm install --save get-root-domain
Usage
getRootDomain( url: string | URL ): string;
Usage example
import getRootDomain from 'get-root-domain';
console.log(
extractRootDomain('http://www.google.co.uk/blah'), // "google.co.uk"
extractRootDomain('http://www.e.leclerc/test'), // "e.leclerc"
);