<commit_before>var RSVP        = require('rsvp');
var listOfDinos = require(__dirname + '/dinos.json');

/**
 * Generates a list of random dinosaur names.
 * @param  {Object}  options
 *                    - paragraphs {Number} the number of paragraphs to generate (defaults to 10).
 *                    - words      {Number} the number of words per paragraph (defaults to 30).
 * @return {Promise} promise.
 */
var generateListOfDinos = function generateListOfDinos(options) {
  return RSVP.Promise(function(resolve, reject) {
    var paragraphs = [];
    var numberOfParagraphs = options.paragraphs || 10;
    var wordsPerParagraph  = options.words      || 30;

    for (var i = 0; i < numberOfParagraphs; i++) {
      paragraphs[i] = [];

    for (var j = 0; j < wordsPerParagraph; j++) {
      paragraphs[i].push(listOfDinos[~~(Math.random() * listOfDinos.length)]);
    }
  }

    resolve(paragraphs);
  });
};

/**
 * Converts an array of paragraphs to an HTML string.
 * @param  {Array}   paragraphs an array of paragraphs.
 * @return {Promise} promise.
 */
var toHTML = function toHTML(paragraphs) {
  return RSVP.Promise(function(resolve, reject) {
    var html = '';

    for (var i = 0, length = paragraphs.length; i < length; i++) {
      html += '<p>' + paragraphs[i].join(' ') + '.</p>';
    }

    resolve(html);
  });
};

/**
 * Converts an array of paragraphs to a stringified JSON object.
 * @param  {Array}   paragraphs an array of paragraphs.
 * @return {Promise} promise.
 */
var toJSON = function toJSON(paragraphs) {
  return RSVP.Promise(function(resolve, reject) {
    resolve(JSON.stringify(paragraphs));
  });<commit_msg>cleaned up indentation level<commit_after>var RSVP        = require('rsvp');
var listOfDinos = require(__dirname + '/dinos.json');

/**
 * Generates a list of random dinosaur names.
 * @param  {Object}  options
 *                    - paragraphs {Number} the number of paragraphs to generate (defaults to 10).
 *                    - words      {Number} the number of words per paragraph (defaults to 30).
 * @return {Promise} promise.
 */
var generateListOfDinos = function generateListOfDinos(options) {
  return RSVP.Promise(function(resolve, reject) {
    var paragraphs = [];
    var numberOfParagraphs = options.paragraphs || 10;
    var wordsPerParagraph  = options.words      || 30;

    for (var i = 0; i < numberOfParagraphs; i++) {
      paragraphs[i] = [];

      for (var j = 0; j < wordsPerParagraph; j++) {
        paragraphs[i].push(listOfDinos[~~(Math.random() * listOfDinos.length)]);
      }
    }

    resolve(paragraphs);
  });
};

/**
 * Converts an array of paragraphs to an HTML string.
 * @param  {Array}   paragraphs an array of paragraphs.
 * @return {Promise} promise.
 */
var toHTML = function toHTML(paragraphs) {
  return RSVP.Promise(function(resolve, reject) {
    var html = '';

    for (var i = 0, length = paragraphs.length; i < length; i++) {
      html += '<p>' + paragraphs[i].join(' ') + '.</p>';
    }

    resolve(html);
  });
};

/**
 * Converts an array of paragraphs to a stringified JSON object.
 * @param  {Array}   paragraphs an array of paragraphs.
 * @return {Promise} promise.
 */
var toJSON = function toJSON(paragraphs) {
  return RSVP.Promise(function(resolve, reject) {
    resolve(JSON.stringify(paragraphs));
  });
{'fraction_non_alphanumeric': 0.14031918096958748, 'fraction_numerical': 0.00662451068955134, 'mean_word_length': 3.0024096385542167, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 7, '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': '3260606', 'n_tokens_mistral': 1062, 'n_tokens_neox': 997, 'n_words': 297}