A minimal unopinionated router. Matches a pathname against a map of routes, and returns the handler and params.
npm install bare-router
Example using React
;;const router =const props =pathname: windowlocationpathname;const handler params = ;ReactDOM;
This work is based off of the enroute package by Matthew Mueller. The main difference is that enroute invokes the route handler with the route params, while this router returns the handler and params. This gives flexibility over when the handler is called, and it's arguments.