phantom-url

1.0.0 • Public • Published

phantom-url Build Status

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

  1. Node's url module is not available on the PhantomJS running context;
  2. Parsing URLs is a pain in the ass;
  3. I'm lazy.

License

MIT © Rafael Rinaldi

/phantom-url/

    Package Sidebar

    Install

    npm i phantom-url

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • rafaelrinaldi