JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.4.2/mustache.min.js"></script>
<script type="text" id="curly">
  orphaned curlies are easy {{ <br>
  {{curly}}example}} curlies are harder
</script>

JavaScript

var data = { 'curly' : '{{'},
    tpl = $('#curly').html(),
    html = Mustache.to_html(tpl, data);

document.write(html);