<commit_before>define([ 'require', 'jquery' ], function (require, $) {
  var controller = $('#wrapper').data('controller'),
      preProcessors = $('#wrapper').data('preprocessors'),
      loadThese = [];

  if (preProcessors) {
    $.each(preProcessors.split(','), function (i, preProcessor) {
      loadThese.push("licensing/controllers/preprocessors/" + preProcessor);
    })
  }

  loadThese.push(controller);

  require(loadThese, function () {
    var args = Array.prototype.slice.call(arguments);
    $.each(args, function (i, func) {
      func();
    });
  });
});<commit_msg>Fail if a module loaded at bootstrap doesn't return a function<commit_after>define([ 'require', 'jquery' ], function (require, $) {
  var controller = $('#wrapper').data('controller'),
      preProcessors = $('#wrapper').data('preprocessors'),
      modules = [];

  if (preProcessors) {
    $.each(preProcessors.split(','), function (i, preProcessor) {
      modules.push("licensing/controllers/preprocessors/" + preProcessor);
    })
  }

  modules.push(controller);

  require(modules, function () {
    var args = Array.prototype.slice.call(arguments);
    $.each(args, function (i, func) {
      if (!_.isFunction(func)) {
        throw "Module " + modules[i] + " does not return a function";
      }
      func();
    });
  });
});
{'fraction_non_alphanumeric': 0.18456883509833585, 'fraction_numerical': 0.0, 'mean_word_length': 3.59375, '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': '6594509', 'n_tokens_mistral': 397, 'n_tokens_neox': 388, 'n_words': 80}