JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" src="http://jquery-formatcurrency.googlecode.com/files/jquery.formatCurrency-1.4.0.min.js"></script>
<input type="text" value="20" id="test" />
JavaScript
alert($("#test").formatCurrency().val());
try {
alert($("#test").val().formatCurrency());
} catch(e) {
alert("wrong");
};