0.1.1 • Published 8 years ago
url-ext v0.1.1
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.