<commit_before>var through = require('through2')

module.exports = function (opt) {
  opt = opt || {}

  return through(function (buf, enc, next) {
    var str = buf.toString()
    var match = /^\[.+console\([0-9]+\)\]\s*\"(.*)\"/i.exec(str)
    if (match) {
      if (opt.verbose) {
        this.push(match[1] + '\n')
      }
    } else if (!/^\[[0-9]+\:/.test(str)) {
      this.push(str)
    }
    next()
  }, function (next) {
    this.push(null)
    next()
  })
}
<commit_msg>fixing some chromium logs that are getting through<commit_after>var through = require('through2')

module.exports = function (opt) {
  opt = opt || {}

  return through(function (buf, enc, next) {
    var str = buf.toString()
    var match = /^\[.+console\([0-9]+\)\]\s*\"(.*)\"/i.exec(str)
    if (match) {
      if (opt.verbose) {
        this.push(match[1] + '\n')
      }
    } else if (!/^\[[0-9]+[\/\:]/.test(str)) {
      this.push(str)
    }
    next()
  }, function (next) {
    this.push(null)
    next()
  })
}

{'fraction_non_alphanumeric': 0.2313060817547358, 'fraction_numerical': 0.011964107676969093, 'mean_word_length': 2.281045751633987, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7437731', 'n_tokens_mistral': 386, 'n_tokens_neox': 379, 'n_words': 75}