You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

jssm-viz

Package Overview
Dependencies
Maintainers
0
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jssm-viz

Visualization of JSSM machines using viz.js


Version published
Weekly downloads
586
decreased by-7.72%
Maintainers
0
Created
Weekly downloads
 

Readme

Source

jssm-viz

Visualization of JSSM machines using viz.js



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-viz

in 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.js

Et 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 is a way to render your fsl and jssm to svg (and from there to jpeg and png.)

See it in use.

TODO: write a better readme

Keywords

FAQs

Package last updated on 07 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc