Skip to content

Instantly share code, notes, and snippets.

@stevekane
Last active August 29, 2015 13:56
Show Gist options
  • Save stevekane/8891518 to your computer and use it in GitHub Desktop.
Save stevekane/8891518 to your computer and use it in GitHub Desktop.
var rr = new RouteRecognizer
//this is currently used
rr.add([
{path: "whatever", handler: whateverHandler}
]);
//when recognize is run, it will return this
[{handler: whateverHandler, params: {}}]
//I would like to also support the case below
rr.add({path: "whatever", handler: whateverHandler})
//and it will return this when recognized
{handler: whateverHandler, params: {}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment