<commit_before>'use strict'
const merge = require('../merge')
const iterator = require('../iterator')
const subscriber = require('../subscriber')

module.exports = function test (target, map) {
  const $test = target.$test
  const test = { $pass: { val: 1 } }
  var $pass

  if (typeof $test === 'function') {
    test.exec = $test
  } else {
    test.exec = $test.val
    test.$ = $test.$
  }

  if (target.$.length !== 1) {
    const path = target.$.slice(0, -1)
    const val = { $test: test }
    val.val = 1
    map = merge(path, val, map)
    $pass = map.$test.$pass
  } else {
    $pass = merge(target.$, test, map).$pass
  }

  $pass._ = { p: map }
  iterator(target, $pass)
  subscriber($pass, target, 't')
  return $pass
}

<commit_msg>changed const to var<commit_after>'use strict'
const merge = require('../merge')
const iterator = require('../iterator')
const subscriber = require('../subscriber')

module.exports = function test (target, map) {
  const $test = target.$test
  var test = { $pass: { val: 1 } }
  var $pass

  if (typeof $test === 'function') {
    test.exec = $test
  } else {
    test.exec = $test.val
    test.$ = $test.$
  }

  if (target.$.length !== 1) {
    const path = target.$.slice(0, -1)
    const val = { $test: test }
    val.val = 1
    map = merge(path, val, map)
    $pass = map.$test.$pass
  } else {
    $pass = merge(target.$, test, map).$pass
  }

  $pass._ = { p: map }
  iterator(target, $pass)
  subscriber($pass, target, 't')
  return $pass
}


{'fraction_non_alphanumeric': 0.18704074816299265, 'fraction_numerical': 0.006680026720106881, 'mean_word_length': 2.689655172413793, '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': '3285261', 'n_tokens_mistral': 538, 'n_tokens_neox': 520, 'n_words': 145}