HFSM Core
Hierarchical Finite State Machine – Embeddable Library
The @statewalker/fsm core library provides a simple and concise API to define processes as a series of transitions between individual states, with the ability to associate specific behaviors to state activations and deactivations.
- Getting Started – create your first state machine with the low-level
FsmProcessengine. - The startProcess Runner – attach per-state behaviour through one
loadcallback; the way most consumers use the library. - Serialization – dump a running machine to a plain object and restore it later.
- Tracing & Logging – watch the machine move without editing any handler.
- API Reference – the complete exported surface.
- GitHub: Source code – explore the library implementation.
Some features:
- Completely self-contained library
- No external runtime dependencies
- Minimal bundle size impact
- Written in TypeScript
- Works with any JavaScript environment – browser, Node.js and Deno compatible