<commit_before>function Ready() {
  this._ready = false;
  this._readyCallbacks = [];
}

Ready.prototype.ready = function(flagOrFunction) {
  var ready = !!this._ready
    , callbacks = this._readyCallbacks || []
    ;

  if ('function' === typeof(flagOrFunction)) {
    callbacks.push(flagOrFunction);
  } else {
    ready = this._ready = !!flagOrFunction;
  }

  if (ready) {
    callbacks.splice(0, Infinity).forEach(function(callback) {
      process.nextTick(function() {
        callback();
      });
    });
  }
}

module.exports = Ready;<commit_msg>allows you to inherit ready without first calling the constructor function (which you still should imo).<commit_after>function Ready() {
  this._ready = false;
  this._readyCallbacks = [];
}

Ready.prototype.ready = function(flagOrFunction) {
  // operate even if inheriting class doesn't properly call constructor
  var ready = !!this._ready
    , callbacks = this._readyCallbacks = this._readyCallbacks || []
    ;

  if ('function' === typeof(flagOrFunction)) {
    callbacks.push(flagOrFunction);
  } else {
    ready = this._ready = !!flagOrFunction;
  }

  if (ready) {
    callbacks.splice(0, Infinity).forEach(function(callback) {
      process.nextTick(function() {
        callback();
      });
    });
  }
}

module.exports = Ready;
{'fraction_non_alphanumeric': 0.14, 'fraction_numerical': 0.0015384615384615385, 'mean_word_length': 3.39527027027027, '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': '1928049', 'n_tokens_mistral': 403, 'n_tokens_neox': 391, 'n_words': 80}