The `window.URL` constructor for Node
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
README.md
index.js
package.json

README.md

URLUtils

Modern browsers all have a window.URL constructor that implements the URLUtils interface. It allows parsing and manipulating of URLs. This package offers a shim for Node to implement similar behaviour. It's based on the popular URIjs.

Installation

Command line: npm install urlutils

Usage

var URL = require('urlutils');
new URL('http://example.com/foobar').pathname; // "/foobar"

References

WHATWG URL Living Standard http://url.spec.whatwg.org/

MDN URL Documentation https://developer.mozilla.org/en-US/docs/Web/API/URL