JSFiddle - React, Tailwind, and code Playground
HTML
<p id="answer"></p>
JavaScript
// on document ready
var f = new getFormatter();
document.getElementById("answer").innerHTML = f.parseValue(123.6);
/*
The following script would be in external library.
*/
function getFormatter() {
var _private = function (data) {
return custom(data);
};
this.parseValue = function (input) {
return _private(input);
}
}
// Simple implementation of custom(data)
function custom(data) {
return data / 2;
}