Created
October 19, 2012 09:51
-
-
Save lennym/3917226 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| route: function (route) { | |
| if (typeof this[route] === 'function') { | |
| // pass on any remaining arguments to route method | |
| var args = [].slice.call(arguments, 1); | |
| this[route].apply(this, args); | |
| } else { | |
| // some kind of error handling | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment