node-parse-url

5.1.0 • Public • Published

node-parse-url

npm

Take a URL string, and return an object. Extend from native url module

Installation

Global

npm install node-parse-url

Usage

 
var parseUrl = require('node-parse-url');
 
var url = parseUrl('https://github.com/aredo');
 
console.log(url);
 
// output
 
// { 
//   protocol: 'https:',
//   host: 'github',
//   port: null,
//   hostname: 'github.com',
//   path: '/aredo',
//   subdomain: null,
//   tld: 'com',
//   domain: 'github.com' 
// }
 

License

(The MIT License)

Package Sidebar

Install

npm i node-parse-url

Weekly Downloads

31

Version

5.1.0

License

MTI

Unpacked Size

3.76 kB

Total Files

4

Last publish

Collaborators

  • hengkiardo