Comparing version 0.19.2 to 1.0.0
{ | ||
"name": "jssm", | ||
"version": "0.19.2", | ||
"version": "1.0.0", | ||
"description": "A Javascript state machine with a simple API. Well tested, and typed with Flowtype. MIT License.", | ||
@@ -44,2 +44,12 @@ "main": "dist/jssm.es5.browserified.js", | ||
"flowtype", | ||
"mealy", | ||
"moore", | ||
"mealy machine", | ||
"moore machine", | ||
"mealy-machine", | ||
"moore-machine", | ||
"graphviz", | ||
"viz.js", | ||
"flowchart", | ||
"visualization", | ||
"StoneCypher" | ||
@@ -46,0 +56,0 @@ ], |
@@ -5,2 +5,26 @@ # jssm | ||
## TL;DR | ||
Specify finite state machines with a brief syntax. Run them. Derive charts from them. Save and load states. Make factories. Impress friends and loved ones. Cure corns and callouses. | ||
```javascript | ||
const traffic_light = new jssm.machine({ | ||
initial_state : 'Red', | ||
transitions : [ | ||
{ action: 'Proceed', from:'Green', to:'Yellow' }, | ||
{ action: 'Proceed', from:'Yellow', to:'Red' }, | ||
{ action: 'Proceed', from:'Red', to:'Green' } | ||
] | ||
}); | ||
traffic_light.state(); // 'Red' | ||
traffic_light.action('Proceed'); | ||
traffic_light.state(); // 'Yellow' | ||
traffic_light.action('Proceed'); | ||
traffic_light.state(); // 'Green' | ||
``` | ||
![](docs/ryg traffic light console screenshot.png) | ||
## Quick Start | ||
@@ -7,0 +31,0 @@ ## Why |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
89698
16
0
66