1.0.5 • Published 7 years ago

rootextract.js v1.0.5

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Simple package to extract the root domain from an URL

JavaScript Style Guide Build Status Coverage Status Dependency Status devDependencies Status Greenkeeper badge npm.io npm.io 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 :white_check_mark:

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'
1.0.5

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago