Directify
Directify is a client-side router, actually it's pretty much Director.js (included) with some additional features/tweaks.
npm install directify
Example usage:
var router = ; // Usage: router(routingTable, targetElement, directorOpts); var directorOpts = { console } var routingTable = { return thistargetinnerHTML = 'This is the root url.'; } { return thistargetinnerHTML = "This is another path, it is: " + thispath; } '/parent': { return thistargetinnerHTML = "This path takes json params, they are: " + JSON; } ; ;