jssm-viz
v5.105.0
Published
Visualization of JSSM machines using viz.js
Downloads
4,646
Maintainers
Readme
jssm-viz
Visualization of JSSM machines using viz.js
Deprecated!
This was written when tree shaking and alternate entrypoints weren't native to node. Now they are. This project was created to prevent the high size of one dependency from impacting the main library. That no longer makes sense.
All JSSM support libraries have been folded into JSSM.
As of May 12 2026, 5.105.0 is the final version of standalone jssm-viz.
jssm-viz is now part of jssm and no longer exists as a standalone project.
TL;DR
Easy to use fsl to svg through jssm.
Node
cd ~/projects && mkdir jssm-viz-demo && cd jssm-viz-demo
npm init -y && npm install --save-dev jssm-vizin dump_svg.js:
async function run() {
const jssm_viz = require('jssm-viz'),
fsl_code = 'green => yellow => red => green; [green yellow red] ~> off -> red;';
svg_code = await jssm_viz.fsl_to_svg_string(fsl_code);
console.log(svg_code);
}
run();node ./dump_svg.jsEt voila: svg of your fsl.
Browser
<!doctype html><html><head><title>jssm-viz example</title>
<script defer type="text/javascript" src="jssm-viz.iife.js"></script>
<script defer type="text/javascript">
window.onload = async () => {
const ExMachine = `
Green => Yellow => Red => Green;
[Red Yellow Green] ~> Off -> Red;
`;
document.getElementById('tgt').innerHTML = await window.jssm_viz.fsl_to_svg_string(ExMachine);
}
</script>
</head>
<body><div id="tgt"></div></body>
</html>What is this?
jssm-viz was a way to render your fsl and jssm to svg (and from there to jpeg and png.)
Now it's just built into JSSM directly.
