url-ext
v0.1.1
Published
core url lib extension
Downloads
6
Readme
url-ext
Installation
$ npm install --save url-ext
Usage
var urlExt = require('url-ext');
var url = 'http://www.xxx.com:8080/search?q=jerrywu#hello';
var hostnameWithProtocol = urlExt.parseHostnameWithProtocol(url);
console.log('hostnameWithProtocol: %s', hostnameWithProtocol); // http://www.xxx.com
License
The MIT License.