<commit_before>'use strict';

var Handlebars = require('handlebars');
var _          = require('lodash');

module.exports = {

    defaults: {
        ext: '.hbs',
        name: 'handlebars'
    },

    /**
     * Extend the Handlebars instance.
     * Register any custom helpers and partials set in the config.
     */

    configure: function(config){
        ext = config.extend || {}
        _.each(ext.helpers || {}, function(helper, name){
            Handlebars.registerHelper(name, helper);
        });
        _.each(ext.partials || {}, function(partial, name){
            Handlebars.registerPartial(name, partial);
        });
    },

    /**
     * Register component view templates as partials.
     * Called every time the component file tree changes.
     */

    registerViews: function(views) {
        views.forEach(function(view){
            Handlebars.registerPartial(view.handle, view.content);
            if (view.alias) {
                Handlebars.registerPartial(view.alias, view.content);
            }
        });
    },

    /**
     * Render the component view contents.
     */

    render: function(str, context, meta) {
        var template = Handlebars.compile(str);
        return template(context);
    }

};
<commit_msg>Fix undefined variable<commit_after>'use strict';

var Handlebars = require('handlebars');
var _          = require('lodash');

module.exports = {

    defaults: {
        ext: '.hbs',
        name: 'handlebars'
    },

    /**
     * Extend the Handlebars instance.
     * Register any custom helpers and partials set in the config.
     */

    configure: function(config){
        const ext = config.extend || {}
        _.each(ext.helpers || {}, function(helper, name){
            Handlebars.registerHelper(name, helper);
        });
        _.each(ext.partials || {}, function(partial, name){
            Handlebars.registerPartial(name, partial);
        });
    },

    /**
     * Register component view templates as partials.
     * Called every time the component file tree changes.
     */

    registerViews: function(views) {
        views.forEach(function(view){
            Handlebars.registerPartial(view.handle, view.content);
            if (view.alias) {
                Handlebars.registerPartial(view.alias, view.content);
            }
        });
    },

    /**
     * Render the component view contents.
     */

    render: function(str, context, meta) {
        var template = Handlebars.compile(str);
        return template(context);
    }

};

{'fraction_non_alphanumeric': 0.12633241215949467, 'fraction_numerical': 0.0, 'mean_word_length': 2.0677966101694913, 'pattern_counts': {'":': 0, '<': 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': '6619891', 'n_tokens_mistral': 686, 'n_tokens_neox': 669, 'n_words': 159}