JSFiddle - React, Tailwind, and code Playground
by lforms
HTML
<script src="https://lhncbc.github.io/ucum-lhc/dist/ucum-lhc.min.js"></script>
<pre id="result" />
JavaScript
var utils = ucumPkg.UcumLhcUtils.getInstance();
var resultObj = utils.validateUnitString('m2/g4');
// Display the result
document.getElementById('result').textContent = JSON.stringify(resultObj, null, 2);