Earlier quoted context omitted.
I think page.js supports middleware if you're looking for something to emulate. Basically chainring callbacks.
Only reference I could find in https://visionmedia.github.io/page.js/ was: page(callback) This is equivalent to page('*', callback) for generic "middleware". Which is... pointless? If you are going to call a function everywhere in front-end why don't you use an IIFE for scope or just nothing at all? Unless you wanted to put it on the and make it load when the page is ready.
page('/some/path', middleware, callback);