Deterministic and Nondeterministic Finite State Machines for JavaScript. The backend for my regex library.