Node's native URL parser to work with PhantomJS.
Install
$ npm install phantom-url
Usage
Example
var url = ; ;// {// "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