<commit_before><commit_msg>Create index.js<commit_after>module.exports = parallel_every;

/*
 * parallel_every
 * Test if every item in the array pass 'iterator' async test
 *
 * @param {Array} array array
 * @param {Function} iterator iterator
 * @param {Function} callback callback
 * @api public
 */

function parallel_every(array, iterator, callback) {
  var completed = 0;
  var len = array.length;
  var i;

  function complete(err, result) {
    if (err) {
      callback(err);
      callback = function () {};
      return;
    }
    if (!result) {
      callback(err, false);
      callback = function () {};
      return;
    }
    completed += 1;
    if (completed === len) {
      callback(err, true);
      return;
    }
  }

  for (i = 0; i < len; i += 1) {
    iterator(array[i], complete);
  }
}
{'fraction_non_alphanumeric': 0.13686806411837238, 'fraction_numerical': 0.004932182490752158, 'mean_word_length': 2.690909090909091, 'pattern_counts': {'":': 0, '<': 4, '<?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': '6655513', 'n_tokens_mistral': 259, 'n_tokens_neox': 251, 'n_words': 74}