<commit_before>Mustache Trimmer (aka Mustache JS compiler)
===========================================

Cleanly shaves your mustache into pure JS<commit_msg>Add sample usage to README<commit_after>Mustache Trimmer (aka Mustache JS compiler)
===========================================

Cleanly shaves your mustache into pure JS

Usage
-----

    require 'mustache/js'
    Mustache.to_javascript("Hello {{planet}}")

Compiled JS function:

    function (obj) {
      var out, l1, stack, fetch, escape, isFunction;
      out = [];
      stack = [];
      stack.push(obj);
      fetch = function fetch(key) {
        var i, v;
        for (i = stack.length - 1; i >= 0; i -= 1) {
          v = stack[i][key];
          if (v) {
            return v;
          }
        }
      };
      escape = function escape(value) {
        return ('' + value)
          .replace(/&/g, '&amp;')
          .replace(/</g, '&lt;')
          .replace(/>/g, '&gt;')
          .replace(/"/g, '&quot;');
      };
      isFunction = function isFunction(obj) {
        return !!(obj && obj.constructor && obj.call && obj.apply);
      };
      out.push("Hello ");
      l1 = fetch("planet");
      if (isFunction(l1)) {
        l1 = l1();
      }
      out.push(escape(l1));
      return out.join("");
    }

{'fraction_non_alphanumeric': 0.21651090342679127, 'fraction_numerical': 0.007009345794392523, 'mean_word_length': 2.0963855421686746, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6211430', 'n_tokens_mistral': 402, 'n_tokens_neox': 393, 'n_words': 100}