JSFiddle - React, Tailwind, and code Playground

by _anil

HTML

<script src="http:////cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script>
<div id="testmustache"></div>

JavaScript

$(function() {
    
    var template = 'whith {{#bold}}Hi {{name}}.{{/bold}}';
    
    var json = {
          "name": "Tater",
          "bold": function () {
            return function (text, render, helper) {
              console.log(text)
              return "<b>" + render(text) + "</b>";
            }
          }
        }

    var html = Mustache.render(template, json); 
    $('div#testmustache').html(html);
    
});