Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.33 KB

File metadata and controls

37 lines (31 loc) · 1.33 KB

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.