🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

splitted-url

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

splitted-url

Use to identify (extract) main domain and hostname from a url. We can also use it as external url checking by comparing domain variable in the result.

latest
Source
npmnpm
Version
1.0.20
Version published
Weekly downloads
479
-8.59%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

split-url

FAQs

Package last updated on 30 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts