High performance finite state machine library for JavaScript