This library is a finite state machine framework for JavaScript designed to manage application states and valid transitions. It provides a system for executing state changes with lifecycle hooks, conditional guards, and transition cancellation.
The project is distinguished by its ability to inject state machine logic and transition capabilities directly into existing JavaScript class instances or objects. It also includes a visualization tool that exports state configurations into Graphviz DOT language for auditing system logic.
The framework covers asynchronous transition execution and pausing via promises, dynamic target state resolution, and state history tracking. It supports the creation of multiple independent machine instances from shared templates and provides mechanisms for attaching custom data and defining reusable methods.
Lifecycle management is handled through automatic callbacks triggered during the entry, exit, and observation phases of a transition.