Project

etsm

0.0
No release in over a year
Efficient Tiny State Machine using object callbacks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

npm version

etsm

Efficient Tiny State Machine using object callbacks. Implemented in many languages.

Description

Implement a bare bones state machine in many languages. This library aim to be simple as possible and support only basic features:

  • states on object (owner)
  • optional enter/exit methods
  • virtual state user methods
  • is in
  • unrestricted transitions
  • no runtime allocation

Languages

Why

For small and simple state machine needs. Source code for each language is very small, easy to copy/paste...
Also because it's funny to see how a little bit of code can be different from language to language.

Install

Depend on the language, etsm is designed to be a one file dropper in your project. But a package might also be available.