Finite State Machines for node.js and the browser.