<commit_before>'use strict';

const Runtime = require('./Runtime');

class Delegate {

  constructor (context) {
    this._context = context || Math.random();
  }

  start (options) {
    return Runtime.start(options);
  }

  getDelegate (context) {
    return new this.constructor(context);
  }

  clear (context) {
    return Runtime.clear(context || this._context);
  }

  on (name, callback) {
    return Runtime.on(name, callback, this._context);
  }

  stop () {
    return Runtime.stop();
  }

  get auth () {
    return Runtime.auth;
  }

  get enableEvents {
    return Runtime._options ? Runtime._options !== false : true;
  }

}

module.exports = Delegate;<commit_msg>added option to disable event bus EXP-1268<commit_after>'use strict';

const Runtime = require('./Runtime');

class Delegate {

  constructor (context) {
    this._context = context || Math.random();
  }

  start (options) {
    return Runtime.start(options);
  }

  getDelegate (context) {
    return new this.constructor(context);
  }

  clear (context) {
    return Runtime.clear(context || this._context);
  }

  on (name, callback) {
    return Runtime.on(name, callback, this._context);
  }

  stop () {
    return Runtime.stop();
  }

  get auth () {
    return Runtime.auth;
  }

  get enableEvents () {
    return Runtime._options ? Runtime._options !== false : true;
  }

}

module.exports = Delegate;
{'fraction_non_alphanumeric': 0.13741007194244603, 'fraction_numerical': 0.0028776978417266188, 'mean_word_length': 3.055393586005831, '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': '7213661', 'n_tokens_mistral': 444, 'n_tokens_neox': 420, 'n_words': 103}