<commit_before>/* jshint node:true */

'use strict';

/**
 * Tests whether every n-tuple in the array pass the test
 * implemented by the provided function.
 *
 * @param  {Number} n The number of items to test against
 * @param  {Array} array The array to iterate over
 * @param  {Function} callback The function to call with every n-tuple
 * @param  {Boolean} thisArg Value to use as this when executing callback
 *
 * @return {Boolean}
 */
module.exports = function everyN(n, array, callback, thisArg) {
  if (n === 1) {
    return array.every(callback, thisArg);
  }

  var lengthMinusN = array.length - n;
  var index;
  var iterationArgs;

  for (index = 0; index <= lengthMinusN; index += 1) {
    iterationArgs = array.slice(index, index + n);
    iterationArgs.push(index + 1, array);
<commit_msg>perf: trivially return true if array length < n<commit_after>/* jshint node:true */

'use strict';

/**
 * Tests whether every n-tuple in the array pass the test
 * implemented by the provided function.
 *
 * @param  {Number} n The number of items to test against
 * @param  {Array} array The array to iterate over
 * @param  {Function} callback The function to call with every n-tuple
 * @param  {Boolean} thisArg Value to use as this when executing callback
 *
 * @return {Boolean}
 */
module.exports = function everyN(n, array, callback, thisArg) {
  if(array.length < n) {
    return true;
  }

  if (n === 1) {
    return array.every(callback, thisArg);
  }

  var lengthMinusN = array.length - n;
  var index;
  var iterationArgs;

  for (index = 0; index <= lengthMinusN; index += 1) {
    iterationArgs = array.slice(index, index + n);
    iterationArgs.push(index + 1, array);

{'fraction_non_alphanumeric': 0.11413364872856298, 'fraction_numerical': 0.004730928444707274, 'mean_word_length': 3.4761904761904763, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3773168', 'n_tokens_mistral': 534, 'n_tokens_neox': 519, 'n_words': 201}