formform module to draw vmap trees in SVG format for visualization in the browser, in PDFs, etc.
Install formform if you haven't already.
Then install the module:
npm install vmap_svg
// ES6:
import vmap_svg from 'vmap-svg';
// CommonJS:
let vmap_svg = require('vmap-svg');
You can then use the module like this:
const vmap = formform.dna.vmap('((a)b)');
const vmapSVG = vmap_svg.draw(vmap.tree, vmap.input, vmap.varorder, vmap.options);
document.body.appendChild(document.createElement('div')).innerHTML = vmapSVG.elem;
Coming soon…