Skip to content

Instantly share code, notes, and snippets.

@pcdinh
Forked from stefanpenner/gist:252277
Created December 9, 2009 09:16
Show Gist options
  • Save pcdinh/252361 to your computer and use it in GitHub Desktop.
Save pcdinh/252361 to your computer and use it in GitHub Desktop.
var Iamstef = Iamstef || {};
(function(lib){
var url = document.URL,
api = {};
api.path = function(regex,fcn){
var result = url.match(regex);
if(result){
fcn(result);
}
};
lib.router = function(fcn){
fcn(api);
};
})(Iamstef);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment