Hey! I'm the creator of xstate: https://github.com/davidkpiano/xstate - a pure, functional, declarative implementation of statecharts in TypeScript. It has zero dependencies, is frameworkless, and fast (O(n) state and transition look-up time for most cases).
I have some important updates to announce at JSConf Iceland, including the ability to translate to/from SCXML, and an improved visualizer.
Though you should always have NIHS in the back of your mind, state machines aren't very difficult to implement which means when you write yours you can really tailor it to your use case.
I remember that the canonical one was always the Quantum framework, but I never wanted to deal with the licensing aspect of it.