Created
December 18, 2018 08:15
-
-
Save evanxg852000/9d49a73f4c157399cf132db00e800da1 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
class Router { | |
constructor(){ | |
this._routes = [] | |
this._prefix = '' | |
} | |
route(specs, methods, handlers){ ... } | |
group(prefix, fn){ ... } | |
all(specs, handlers){ ... } | |
_dispatch(request, response){ ... } | |
_patternToRegex(pattern){ ... } | |
_cleanHandlers(handlers){ ... } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment