Skip to content

Instantly share code, notes, and snippets.

View PseudoNinja's full-sized avatar
🐕‍🦺
Full-stack engineer looking for his next forever home

Eric M. PseudoNinja

🐕‍🦺
Full-stack engineer looking for his next forever home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pseudoninja on github.
  • I am pseudoninja (https://keybase.io/pseudoninja) on keybase.
  • I have a public key ASB4mpm2If1oxx-o2Blp8BW7kf6YfemlZCIQJHXgrC86igo

To claim this, I am signing this object:

@PseudoNinja
PseudoNinja / uri.js
Last active August 29, 2015 14:13 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
(function(){
parser.isLocal = (window.location.host === parser.host) ? true : false; // determine if is local url
parser.fullPath = parser.host + parser.pathname + parser.hash;
parser.params = {};
// Convert query string to object
var split,
@PseudoNinja
PseudoNinja / uri.js
Last active August 29, 2015 14:13 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"