<commit_before>'use strict'

exports.define = {
  emitInstances: function (emitter, data, event, key) {
    // pass along meta
    if (!emitter || emitter.emitInstances) {
      let instances = this.getInstances()
      let instance
      if (instances && !this._context) {
        for (let i in instances) {
          instance = instances[i]
          instance.emit(key, data, event)
        }
      }
    }
  }
}<commit_msg>revert to array for instances<commit_after>'use strict'

exports.define = {
  emitInstances: function (emitter, data, event, key) {
    // !emitter is obviously super slow!
    if (!emitter || emitter.emitInstances) {
      let instances = this.getInstances()
      if (instances && !this._context) {
        let instance
        let length = instances.length
        for (let i = 0; i < length; i++) {
          instance = instances[i]
          instance.emit(key, data, event)
        }
      }
    }
  }
}
{'fraction_non_alphanumeric': 0.11991434689507495, 'fraction_numerical': 0.0010706638115631692, 'mean_word_length': 2.2241379310344827, 'pattern_counts': {'":': 0, '<': 4, '<?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': '5086775', 'n_tokens_mistral': 284, 'n_tokens_neox': 274, 'n_words': 77}