phantom-url
v1.0.0
Published
Node's native URL parser to work with PhantomJS.
Downloads
7
Maintainers
Readme
phantom-url
Node's native URL parser to work with PhantomJS.
Install
$ npm install phantom-url
Usage
Example
var url = require('phantom-url');
url('http://localhost:8080/index.html');
// {
// "hash": "",
// "host": "localhost:8080",
// "hostname": "localhost",
// "href": "http://localhost:8080/index.html",
// "pathname": "/index.html",
// "port": "8080",
// "protocol": "http:",
// "search": ""
// }
Why
- Node's
url
module is not available on the PhantomJS running context; - Parsing URLs is a pain in the ass;
- I'm lazy.
License
MIT © Rafael Rinaldi