JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 548
  • Score
    100M100P100Q79195F

First-class states

Package Exports

  • state

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (state) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

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.

👋