@buggyorg/npg-port-remodeler

takes a portgraph (e.g. from math2graph) and remodels the port information by creating a node for each port and connecting them accordingly. The created graph is equivalent and is also no longer a multigraph and all payload is now at the nodes whereas the edges remain without payload

Usage no npm install needed!

<script type="module">
  import buggyorgNpgPortRemodeler from 'https://cdn.skypack.dev/@buggyorg/npg-port-remodeler';
</script>

README

npg-port-remodeler

takes a portgraph (e.g. from math2graph) and remodels the port information by creating a node for each port and connecting them accordingly. The created graph is equivalent and is also no longer a multigraph and all payload is now at the nodes whereas the edges remain without payload