<commit_before>// preprocessor.js
var ReactTools = require("react-tools"),
    es6defaultParams = require("es6-default-params"),
    regenerator = require("regenerator");

module.exports = {
    process: function(src) {
        src = es6defaultParams.compile(src).code;
        src = regenerator.compile(src, {
            includeRuntime: true
        }).code;
        return ReactTools.transform(src, {
            stripTypes: true,
            harmony: true
        });
    }
};<commit_msg>Don't pass Backbone through regenerator.<commit_after>// preprocessor.js
var ReactTools = require("react-tools"),
    es6defaultParams = require("es6-default-params"),
    regenerator = require("regenerator");

module.exports = {
    process: function(src) {
        src = es6defaultParams.compile(src).code;
        // Regenerator has a bug when using backbone
        if (src.indexOf("root.Backbone = factory(") === -1) {
            src = regenerator.compile(src, {
                includeRuntime: true
            }).code;
        }
        return ReactTools.transform(src, {
            stripTypes: true,
            harmony: true
        });
    }
};
{'fraction_non_alphanumeric': 0.12717770034843207, 'fraction_numerical': 0.006097560975609756, 'mean_word_length': 2.3112391930835736, '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': '4074761', 'n_tokens_mistral': 319, 'n_tokens_neox': 315, 'n_words': 65}