<commit_before>var randInt = require('../random/randInt')

// shuffle array items

function shuffle (arr) {
  var results = []
  var rnd

  if (arr == null) return results

  var i = -1
  var len = arr.length
  var value
  while (++i < len) {
    if (!i) results[0] = arr[0]
    else {
      rnd = randInt(0, 1)
      results[i] = results[rnd]
      results[rnd] = arr[i]
    }
  }
  return results
}<commit_msg>minor edit<commit_after>var randInt = require('../random/randInt')

// shuffle array items

function shuffle (arr) {
  var results = []
  var rnd

  if (arr == null) return results

  var i = -1
  var len = arr.length
  var value
  while (++i < len) {
    if (!i) results[0] = arr[0]
    else {
      rnd = randInt(0, 1)
      results[i] = results[rnd]
      results[rnd] = arr[i]
    }
  }
  return results
}

module.exports = shuffle
{'fraction_non_alphanumeric': 0.14403778040141677, 'fraction_numerical': 0.011806375442739079, 'mean_word_length': 2.4331983805668016, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2090009', 'n_tokens_mistral': 323, 'n_tokens_neox': 309, 'n_words': 89}