<commit_before>(function() {
  'use strict';

  var _ = require('lodash');
  var chalk = require('chalk');
  var pluralize = require('pluralize');

  function exit(options) {
    options = options || {};
    process.stdin.resume();

    process.on('exit', exitHandler);
    process.on('SIGINT', _.partial(exitHandler, {exitCode: 2}));
    process.on('uncaughtException', _.partial(exitHandler, {exitCode: 99}));

    function exitHandler(exitData, err) {
      if (!options.quiet && err && err.stack) {
        console.error(chalk.red(err));
        process.exit(1);
      }

      if (!_.isEmpty(options.children)) {
        if (options.verbose) {
          console.log('Killing', chalk.bold.blue(children.length + ''), 'background', pluralize('process', children.length), '...');
        }

        _.each(children, function(child) {
          if (_.isFunction(_.get(child, 'kill'))) {
            if (_.isNumber(options.verbose) && options.verbose > 1) {
              console.log(chalk.bold.cyan('process:'), child);
            }

            child.kill();
          } else if (options.verbose) {
            console.log(chalk.bold.yellow('[WARNING:]'), 'Not a valid node process. Skipping.');
            console.log(chalk.bold.cyan('found:'), child);
          }
        });

        children = [];
      }

      if (_.get(exitData, 'exit')) {
        process.exit(exitData.exit);
      }
    }
  }

  module.exports = exit;
})();
<commit_msg>add children to options object<commit_after>(function() {
  'use strict';

  var _ = require('lodash');
  var chalk = require('chalk');
  var pluralize = require('pluralize');

  function exit(options) {
    options = options || {};
    process.stdin.resume();

    process.on('exit', exitHandler);
    process.on('SIGINT', _.partial(exitHandler, {exitCode: 2}));
    process.on('uncaughtException', _.partial(exitHandler, {exitCode: 99}));

    function exitHandler(exitData, err) {
      if (!options.quiet && err && err.stack) {
        console.error(chalk.red(err));
        process.exit(1);
      }

      if (!_.isEmpty(options.children)) {
        if (options.verbose) {
          console.log('Killing', chalk.bold.blue(children.length + ''), 'background', pluralize('process', children.length), '...');
        }

        _.each(options.children, function(child) {
          if (_.isFunction(_.get(child, 'kill'))) {
            if (_.isNumber(options.verbose) && options.verbose > 1) {
              console.log(chalk.bold.cyan('process:'), child);
            }

            child.kill();
          } else if (options.verbose) {
            console.log(chalk.bold.yellow('[WARNING:]'), 'Not a valid node process. Skipping.');
            console.log(chalk.bold.cyan('found:'), child);
          }
        });

        children = [];
      }

      if (_.get(exitData, 'exit')) {
        process.exit(exitData.exit);
      }
    }
  }

  module.exports = exit;
})();

{'fraction_non_alphanumeric': 0.179364537068671, 'fraction_numerical': 0.0034164673727365906, 'mean_word_length': 2.4125874125874125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6455466', 'n_tokens_mistral': 917, 'n_tokens_neox': 880, 'n_words': 154}