npm install dom-urlsNode DOM URLs
=============



A partial implementation of the W3C URL Spec Draft for Node building on top of URIjs.
If you find incompatibilities, please report them. Error handling is currently very different from the spec.
Browser Polyfills
-----------------
- Joshua Bell's Polyfill
- Eric Arvidsson's Polyfill
Installation
------------
npm install dom-urls
Example
-------
``js
var URL = require('dom-urls');
var url = new URL('relative', 'http://example.com/sub/');
url.protocol; // 'http:'
url.hostname; // 'example.com'
url.pathname; // '/sub/relative/'
url.host = 'example.net:8080';
url.port; // '8080'
`
Why urijs instead of url?
-----------------------------
I tried it first, but Node's own URL module doesn't propagate changes, so
changing the host` doesn't affect the port and vice-versa and I didn't want to
reimplement all of that myself.