Skip to content

rafaelrinaldi/phantom-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

👻 Node's native URL parser to work with PhantomJS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published