<commit_before>"use strict";

const _ = require('lodash');

module.exports = (function() {

  function sort(array) {
    let size = array.length;
    for(let i = 0; i < size; i++) {
      for(let j = i + 1; j < size; j++) {
        if (array[j] < array[i]) {
          exch(array, i, j);
        }
      }
    }
  }

  function exch(array, i, min) {
    let temp = array[i];
    array[i] = array[min];
    array[min] = temp;
  }

  return {
    sort: sort
  };

})();<commit_msg>add function less<commit_after>"use strict";

const _ = require('lodash');

module.exports = (function() {

  function sort(array) {
    let size = array.length;
    for(let i = 0; i < size; i++) {
      for(let j = i + 1; j < size; j++) {
        if (less(array, j, i)) {
          exch(array, i, j);
        }
      }
    }
  }

  function less(array, i, min) {
    return array[i] < array[min];
  }

  function exch(array, i, min) {
    let temp = array[i];
    array[i] = array[min];
    array[min] = temp;
  }

  return {
    sort: sort
  };

})();
{'fraction_non_alphanumeric': 0.18313953488372092, 'fraction_numerical': 0.003875968992248062, 'mean_word_length': 2.092814371257485, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2810842', 'n_tokens_mistral': 402, 'n_tokens_neox': 386, 'n_words': 98}