<commit_before>var _ = require('./utils')

// ES5 shim for legacy browsers
function toInteger(num) {
  var n = +num
  if (n !== n) { // isNaN
      n = 0;
  } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
      n = (n > 0 || -1) * Math.floor(Math.abs(n))
  }
  return n
}

if (!Array.prototype.indexOf) {
  Array.prototype.indexOf = function indexOf(sought /*, fromIndex */) {
    var self = Object(this)
    var length = self.length >>> 0

    if (!length) { return -1 }

    var i = 0
    if (arguments.length > 1) {
      i = toInteger(arguments[1])
    }
    // handle negative indices
    i = i >= 0 ? i : Math.max(0, length + i)
    for (; i < length; i++) {
      if (i in self && self[i] === sought) {
        return i
      }
    }
    return -1
  }
}
// end shim

var buf = []
var store = module.exports = {}

store.push = function (thread) {
  buf.push(thread)
}

store.all = function () {
  return buf.slice()
}

store.remove = function (thread) {
  var index = buf.indexOf(thread)
  if (index >= 0) buf.splice(index, 1)
}

store.flush = function () {
  buf.splice(0)
}

store.total = function () {<commit_msg>refactor(store): remove shim for IE8<commit_after>var _ = require('./utils')

var buf = []
var store = module.exports = {}

store.push = function (thread) {
  buf.push(thread)
}

store.all = function () {
  return buf.slice()
}

store.remove = function (thread) {
  var index = buf.indexOf(thread)
  if (index >= 0) buf.splice(index, 1)
}

store.flush = function () {
  buf.splice(0)
}

store.total = function () {
{'fraction_non_alphanumeric': 0.1786407766990291, 'fraction_numerical': 0.015533980582524271, 'mean_word_length': 2.529680365296804, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, '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': '1397868', 'n_tokens_mistral': 579, 'n_tokens_neox': 560, 'n_words': 150}