splitted-url

1.0.20 • Public • Published

splitted-url

NPM Version NPM Downloads Coverage Status

It will use to identify main domain and hostname from a url

Installing

npm i splitted-url --save

Usage

const splittedUrl = require('splitted-url')

splittedUrl('https://google.com')
// => { host: 'google.com', domain: 'google.com' }

splittedUrl('https://google.co.in')
// => { host: 'google.co.in', domain: 'google.co.in' }

splittedUrl('https://www.google.com')
// => { host: 'www.google.com', domain: 'google.com' }

splittedUrl('https://www.google.co.in')
// => { host: 'www.google.co.in', domain: 'google.co.in' }

Package Sidebar

Install

npm i splitted-url

Weekly Downloads

817

Version

1.0.20

License

ISC

Unpacked Size

24.3 kB

Total Files

10

Last publish

Collaborators

  • vibrantdevuser
  • christyram99