Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jssm

Package Overview
Dependencies
Maintainers
1
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jssm - npm Package Compare versions

Comparing version 0.19.2 to 1.0.0

docs/ryg traffic light console screenshot.png

12

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc