Take a URL string, and return an object. Extend from native url module
Global
npm install node-parse-url
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'
// }(The MIT License)