rootextract.js

1.0.5 • Public • Published

Simple package to extract the root domain from an URL

JavaScript Style Guide Build Status Coverage Status Dependency Status devDependencies Status Greenkeeper badge Version Downloads

rootExtract.js takes a URL string parses it and returns a URL object with a rootDomain field.

Features

  • Supports Mexican and Australian web links ✅

How to install

npm install rootextract.js

How to use

Use it in your app

const rooter = require('rootextract.js')

const url = rooter.parse('http://www.example.co.uk')

//We return the normal URL object with an appended rootDomain field.
console.log(url.rootDomain)

//Prints out 'example.co.uk'

Readme

Keywords

none

Package Sidebar

Install

npm i rootextract.js

Weekly Downloads

0

Version

1.0.5

License

ISC

Last publish

Collaborators

  • fredrikholmen