<commit_before>export default class PubSub {
  constructor() {
    this._connections = {};
  }

  subscribe(name, connection, action) {
    this._connections[name] = this._connections[name] || new Set();

    if (action === true) {
      this._connections[name].add(connection);

      connection.once('close', () => {
        this.subscribe(name, connection, false);
      });
    } else if (action === false) {
      this._connection[name].delete(connection);
    }

    return this;
  }<commit_msg>Fix reference error<commit_after>export default class PubSub {
  constructor() {
    this._connections = {};
  }

  subscribe(name, connection, action) {
    this._connections[name] = this._connections[name] || new Set();

    if (action === true) {
      this._connections[name].add(connection);

      connection.once('close', () => {
        this.subscribe(name, connection, false);
      });
    } else if (action === false) {
      this._connections[name].delete(connection);
    }

    return this;
  }
{'fraction_non_alphanumeric': 0.1565906838453915, 'fraction_numerical': 0.0, 'mean_word_length': 3.0562248995983934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2841509', 'n_tokens_mistral': 302, 'n_tokens_neox': 281, 'n_words': 58}