<commit_before>/**
 *  class JstEngine
 *
 *  Engine for the JST files. This is a core wrapper, that wraps function
 *  prepared by view renderers like Haml Coffee.
 *
 *
 *  ##### SUBCLASS OF
 *
 *  [[Template]]
 *
 *  ##### Creating JST compatible engines
 *
 *  If you subclass [[Template]] (in Mincer core), you can create your own `JST`
 *  precompiled templates. In order to make own engine compatible with `JST`
 *  processor, there are two options:
 *
 *  1. You can just evaluate the template as an string and pass it to the
 *     callback. For example:
 *
 *      var StrEngine = module.exports = function StrEngine() {
 *        Template.apply(this, arguments);
 *      };
 *
 *      require('util').inherits(StrEngine, Template);
 *
 *      StrEngine.prototype.compile = function () {
 *        var source = this.data;
 *
 *        source = source.split("\n").map(function (l) {
 *          return l.trim();
 *        }).join('\\n').trim();
 *
 *        source = source.replace(/\{\{([^\}]+)\}\}/gi, '" + this.$1 + "');
 *        source = source.replace(/\[\[([^\]]+)\]\]/gi, '" + locals.$1 + "');
 *
 *        return 'function(locals) { return "' + source + '"; }';
 *      };
 *
 *      StrEngine.prototype.evaluate = function (context, locals, callback) {
 *        callback(null, this.compile());
 *      };
 *
 *      Mincer.registerEngine('.str',  StrEngine);
 *
 *  2. You can use lazy evaluation, passing the engine object itself to the
 *     callback and defining the method `toString` and the function member
 *     `lazySource`. For example:
 *
 *      var LzyEngine = module.exports = function LzyEngine() {
 *        Template.apply(this, arguments);
 *      };
 *
 *      require('util').inherits(LzyEngine, Template);
 *
 *      LzyEngine.prototype.toString = function () {
 *        return this.lazySource.call(this.options.context, this.options.locals);
 *      };
 *
 *      LzyEngine.prototype.compile = function () {
 *        var source = this.data;
 *
 *        source = source.split("\n").map(function (l) {
 *          return l.trim();
 *        }).join('\\n').trim();
 *
 *        source = source.replace(/\{\{([^\}]+)\}\}/gi, '" + this.$1 + "');
 *        source = source.replace(/\[\[([^\]]+)\]\]/gi, '" + locals.$1 + "');
 *
 *        return new Function('locals', 'return "' + source  + '";');
 *      };
 *
 *      LzyEngine.prototype.evaluate = function (context, locals, callback) {
 *        this.lazySource = this.compile();
 *        this.options = { "context": context, "locals": locals };
 *        callback(null, this);
 *      };
 *
 *      Mincer.registerEngine('.lzy',  LzyEngine);
 *
 *  The advantage of using the second approach is that your engine can be used
 *  with other following processors in the asset pipeline, not only with `JST`.
 *
 *  ##### See Also
 *
 *  - [[Template#evaluate]]
 **/

'use strict';


// 3rd-party<commit_msg>doc markup fix<commit_after>/**
 *  class JstEngine
 *
 *  Engine for the JST files. This is a core wrapper, that wraps function
 *  prepared by view renderers like Haml Coffee.
 *
 *
 *  ##### SUBCLASS OF
 *
 *  [[Template]]
 *
 *  ##### Creating JST compatible engines
 *
 *  If you subclass [[Template]] (in Mincer core), you can create your own `JST`
 *  precompiled templates. In order to make own engine compatible with `JST`
 *  processor, there are two options:
 *
 *  1. You can just evaluate the template as an string and pass it to the
 *     callback. For example:
 *
 *     ```javascript
 *     var StrEngine = module.exports = function StrEngine() {
 *       Template.apply(this, arguments);
 *     };
 *
 *     require('util').inherits(StrEngine, Template);
 *
 *     StrEngine.prototype.compile = function () {
 *       var source = this.data;
 *
 *       source = source.split("\n").map(function (l) {
 *         return l.trim();
 *       }).join('\\n').trim();
 *
 *       source = source.replace(/\{\{([^\}]+)\}\}/gi, '" + this.$1 + "');
 *       source = source.replace(/\[\[([^\]]+)\]\]/gi, '" + locals.$1 + "');
 *
 *       return 'function(locals) { return "' + source + '"; }';
 *     };
 *
 *     StrEngine.prototype.evaluate = function (context, locals, callback) {
 *       callback(null, this.compile());
 *     };
 *
 *     Mincer.registerEngine('.str',  StrEngine);
 *     ```
 *
 *  2. You can use lazy evaluation, passing the engine object itself to the
 *     callback and defining the method `toString` and the function member
 *     `lazySource`. For example:
 *
 *     ```javascript
 *     var LzyEngine = module.exports = function LzyEngine() {
 *       Template.apply(this, arguments);
 *     };
 *
 *     require('util').inherits(LzyEngine, Template);
 *
 *     LzyEngine.prototype.toString = function () {
 *       return this.lazySource.call(this.options.context, this.options.locals);
 *     };
 *
 *     LzyEngine.prototype.compile = function () {
 *       var source = this.data;
 *
 *       source = source.split("\n").map(function (l) {
 *         return l.trim();
 *       }).join('\\n').trim();
 *
 *       source = source.replace(/\{\{([^\}]+)\}\}/gi, '" + this.$1 + "');
 *       source = source.replace(/\[\[([^\]]+)\]\]/gi, '" + locals.$1 + "');
 *
 *       return new Function('locals', 'return "' + source  + '";');
 *     };
 *
 *     LzyEngine.prototype.evaluate = function (context, locals, callback) {
 *       this.lazySource = this.compile();
 *       this.options = { "context": context, "locals": locals };
 *       callback(null, this);
 *     };
 *
 *     Mincer.registerEngine('.lzy',  LzyEngine);
 *     ```
 *
 *  The advantage of using the second approach is that your engine can be used
 *  with other following processors in the asset pipeline, not only with `JST`.
 *
 *  ##### See Also
 *
 *  - [[Template#evaluate]]
 **/

'use strict';


// 3rd-party
{'fraction_non_alphanumeric': 0.181786941580756, 'fraction_numerical': 0.0024054982817869417, 'mean_word_length': 2.4814593301435406, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '4502649', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1764, 'n_words': 455}