get-root-domain
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i get-root-domain

Weekly Downloads

82

Version

0.0.1

License

MIT

Unpacked Size

1.8 kB

Total Files

4

Last publish

Collaborators

  • gaetanlegac