Module: sm

sm.js module provides means to create and use state machines. State machines are very powerful tool for handling behavior and dynamic aspects of any software.

Since:
  • 0.2.0
Source:

Classes

StateMachine

Namespaces

Errors

Methods

(static) defSM(definition) → {function}

Creates and returns a state machine constructor function based on the given state machine definition object. Using the returned constructor function one can create state machine instances one for each host object that needs to be handled by the given state machine definition.
Parameters:
Name Type Description
definition object specification of the state machine
Since:
  • 0.2.0
Source:
Throws:
Type
Error
Returns:
state machine constructor function
Type
function