fsm2dot
Inspects a file containing a finite state machine defined using fsm-as-promised or javascript-state-machine libraries, and outputs the correspondent UML diagram using DOT graph representation.
Features
The following finite state machine:
/* * the file must contain * var StateMachine = require('fsm-as-promised'); * or * var StateMachine = require('javascript-state-machine'); */ var fsm = StateMachine; {}
will be converted to a DOT graph that can be visialized like this:
Command Line
Install node, then:
$ npm install -g fsm2dot
and run:
$ fsm2dot --help
Test
$ npm install -g mocha$ npm test
License
MIT