README
Overview
This is a Finite State Machine component for xevo projects.
Installation
npm install --save xevo-fsm
Usage
Simplest use case is to build a runner directly
import {Fsm} from "xevo-fsm"
let fsm = Fsm.builder()
.addTransition("Ping", "beat", "Pong")
.addTransition("Pong", "beat", "Ping")
.buildRunner();
console.log(fsm.currentState); // Ping
fsm.event("beat")
console.log(fsm.currentState); // Pong
fsm.event("beat")
console.log(fsm.currentState); // Ping