0.0.1 • Published 3 years ago

get-root-domain v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Extract Price from String

Extract root domain name from an URL.

npm

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"
);