<commit_before>// Load in dependencies
var _ = require('underscore'),
    mapContent = require('./mapContent'),
    fuseOutlines = require('./fuseOutlines');

// Return our generateBatches function
module.exports = function generateBatches (outlineArr, contentArr) {
  // Map content
  var mappedObj = mapContent(contentArr),
      mappedContent = mappedObj.content,
      keysUsed = mappedObj.keysUsed,
      keysNotFound = mappedObj.keysNotFound;

  // Stash the global items off of the mapped
  var globalHooks = {
        before: mappedContent.before,
        beforeEach: mappedContent.beforeEach,
        afterEach: mappedContent.afterEach,
        after: mappedContent.after
      };
  delete mappedContent.before;
  delete mappedContent.beforeEach;
  delete mappedContent.after;
  delete mappedContent.afterEach;

  // Save the listed keys
  var keysListed = Object.getOwnPropertyNames(mappedContent);

  // Fuse outlines with content and into batches
  var batchObj = fuseOutlines({
        content: mappedContent,
        outline: outlineArr
      }),
      batches = batchObj.batches;

  // Save the keys used and keys not found
  keysUsed.push.apply(keysUsed, batchObj.keysUsed);
  keysNotFound.push.apply(keysNotFound, batchObj.keysNotFound);

  // Append global keys to keysUsed to prevent false errors
  keysUsed.push('before', 'beforeEach', 'afterEach', 'after');
<commit_msg>Removed unnecessary .push call for globals<commit_after>// Load in dependencies
var _ = require('underscore'),
    mapContent = require('./mapContent'),
    fuseOutlines = require('./fuseOutlines');

// Return our generateBatches function
module.exports = function generateBatches (outlineArr, contentArr) {
  // Map content
  var mappedObj = mapContent(contentArr),
      mappedContent = mappedObj.content,
      keysUsed = mappedObj.keysUsed,
      keysNotFound = mappedObj.keysNotFound;

  // Stash the global items off of the mapped
  var globalHooks = {
        before: mappedContent.before,
        beforeEach: mappedContent.beforeEach,
        afterEach: mappedContent.afterEach,
        after: mappedContent.after
      };
  delete mappedContent.before;
  delete mappedContent.beforeEach;
  delete mappedContent.after;
  delete mappedContent.afterEach;

  // Save the listed keys
  var keysListed = Object.getOwnPropertyNames(mappedContent);

  // Fuse outlines with content and into batches
  var batchObj = fuseOutlines({
        content: mappedContent,
        outline: outlineArr
      }),
      batches = batchObj.batches;

  // Save the keys used and keys not found
  keysUsed.push.apply(keysUsed, batchObj.keysUsed);
  keysNotFound.push.apply(keysNotFound, batchObj.keysNotFound);

{'fraction_non_alphanumeric': 0.09006326758466691, 'fraction_numerical': 0.0, 'mean_word_length': 3.5792163543441227, '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': '1320890', 'n_tokens_mistral': 737, 'n_tokens_neox': 722, 'n_words': 200}