Skip to content

nickfargo/state

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
lib
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

State.js

State is a JavaScript library for implementing first-class states on arbitrary owner objects.

A 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.

State object model

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.


Visit statejs.org for an introduction, with sample code, comprehensive documentation including a getting started guide and conceptual overview, API reference, and annotated source.

πŸ‘‹

About

Composable, heritable first-class states

Resources

License

Stars

Watchers

Forks

Packages

No packages published