Skip to content

Instantly share code, notes, and snippets.

@stefanpenner
Created December 9, 2009 05:01
Show Gist options
  • Save stefanpenner/252277 to your computer and use it in GitHub Desktop.
Save stefanpenner/252277 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