npm install state
|2||downloads in the last week|
|19||downloads in the last month|
|Version||0.2.0 last updated 5 months ago|
|Keywords||state, transition, behavior, behaviour, prototype, prototypal, hierarchical, fsm, state machine|
State is a module of behavior — expressed as definitions of methods, data, and/or events — that can be exhibited by its owner. The State object model provides for hierarchical, compositional, and indirect prototypal relations between
States, facilitating a variety of patterns for reuse and modularity.
An owner object exhibits the behavior expressed by its current state — method calls the owner receives are automatically dispatched to methods defined or inherited by that
State. Behavior of the owner is altered by executing transitions that carry its current state reference from one of its
States to another.