Skip to content

Instantly share code, notes, and snippets.

@CitizenOfRome
CitizenOfRome / UFCOE.parseUri.js
Last active April 7, 2017 09:09 — forked from mrclay/UFCOE.parseUri.js
Parse a URI using the browser's DOM
(function (w, d) {
//https://gist.github.com/1847816
var a, k = 'protocol hostname host pathname port search hash href'.split(' ');
w.UFCOE = w.UFCOE || {};
/**
* Parse a URI, returning an object similar to Location
*
* Usage: UFCOE.parseUri("hello?search#hash").search -> "?search"
*
* @param String url