<commit_before>var _ = require('lodash')

function isGenerator (input) {
  return typeof input === 'function' && input.constructor.name === 'GeneratorFunction'
}

function slice (arrayLike, startPos, endPos) {
  if (!arrayLike) {
    return []
  }

  var result = [],
  i = typeof startPos === 'number' || startPos instanceof Number ? startPos : 0,
  len = typeof endPos === 'number' || endPos instanceof Number ? endPos : arrayLike.length

  if (i < 0) {
    i = i + len

    if (i < 0) {
      i = 0
    }
  }

  if (len < 0) {
    len = len + arrayLike.length
<commit_msg>fix lodash.slice will not work correctly in something case<commit_after>var _ = require('lodash')

function isGenerator (input) {
  return typeof input === 'function' && input.constructor.name === 'GeneratorFunction'
}

function slice (arrayLike, startPos, endPos) {
  if (!Array.isArray(arrayLike)) {
    return []
  }

  var result = []

  var i = Math.floor(startPos)

  if (isNaN(i)) {
    i = 0
  }

  var len = Math.floor(endPos)

  if (isNaN(len)) {
    len = arrayLike.length
  }

  if (i < 0) {
    i = i + len

    if (i < 0) {
      i = 0
    }
  }

  if (len < 0) {
    len = len + arrayLike.length

{'fraction_non_alphanumeric': 0.14502529510961215, 'fraction_numerical': 0.008431703204047217, 'mean_word_length': 2.7210031347962382, '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': '2681331', 'n_tokens_mistral': 427, 'n_tokens_neox': 403, 'n_words': 116}