Machina.js - Finite State Machines in JavaScript
machina.js is a framework for creating flexible finite state machines in JavaScript