Skip to content

Instantly share code, notes, and snippets.

View rewathkafley's full-sized avatar
🎯
Focusing

rewathkafley

🎯
Focusing
View GitHub Profile
@rewathkafley
rewathkafley / UFCOE.parseUri.js
Created September 18, 2019 08:06 — forked from mrclay/UFCOE.parseUri.js
Parse a URI using the browser's DOM
(function (w, d) {
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
* @return Object