<commit_before><commit_msg>Add js bubble sort.<commit_after>function insertionSort (A = []) {

  var tempValue;
  var flag = 0;

  for (k = 1; k < A.length; k++) {
    flag = 0;
    for (i = 0; i < A.length - k; i++) {
      if (A[i+1] < A[i]) {
        tempValue = A[i+1];
        A[i+1] = A[i];
        A[i] = tempValue;
        flag += 1;
      }
    }
    if (flag === 0) {
      break;
    }
  }
  return A;
}
{'fraction_non_alphanumeric': 0.1932367149758454, 'fraction_numerical': 0.021739130434782608, 'mean_word_length': 1.6948051948051948, 'pattern_counts': {'":': 0, '<': 6, '<?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': '6240775', 'n_tokens_mistral': 180, 'n_tokens_neox': 170, 'n_words': 43}