wearefractal/rooter — pull request #1 by JosephJNK (2012-08-14 01:33:03+00:00)
Title: Added optional before step and setup/teardown

Before steps can be added to routes between the time they are created and when rooter.init is called. These steps will be called when a route is requested, and they can redirect a request by changing the hash, perform side effects, and/or return an error to prevent the hash change from taking effect.

Route takes an optional teardown that is called when leaving a page, before setup is called on the next page.