StateCharts Interpretation and Optimization eNgine (SCION) is an implementation of Statecharts in JavaScript. This is a transitional package for the next generation of SCION.

npm install scion-ng
1 downloads in the last week
15 downloads in the last month

This is the transitional repository for the next generation of the SCION JavaScript library. This documentation is in flux, and is incomplete.


Statecharts is a powerful modelling language for developing complex, timed, event-driven, state-based systems. For an overview of Statecharts see STATECHARTS: A VISUAL FORMALISM FOR COMPLEX SYSTEMS and The Rhapsody Semantics of Statecharts.

SCION is a small (2.9kb, minified and gzipped), embeddable implementation of Statecharts in ECMAScript (JavaScript). SCION lets you program with Statecharts using a simple JavaScript/JSON API. It can be used in the browser to manage complex user interface behaviour, or on the server under Node.js or Rhino to manage page navigation and asynchronous control flow. It can even be used in custom JavaScript environments, such as the Mozilla Spidermonkey shell.

SCION is written so as to abstract out platform dependencies, and is implemented as a single UMD module, which makes it easy to deploy in any JavaScript environment. The philosophy of SCION is "write once, embed everywhere".

SCION powers SCXML.js, an implementation of SCXML in JavaScript, and as such, it supports all of the features of the SCXML core module, including compound states ( OR states), parallel states ( AND states), and history states.

npm loves you