<commit_before>var ObservableThing = function(thing) {
  this.thing = thing;
  this.onChangeListener = null;
};

ObservableThing.prototype.set = function(newValue) {
  this.thing = newValue;
  this.notify();
};

ObservableThing.prototype.get = function() {
  return this.thing;
};

ObservableThing.prototype.setChangeListener = function(listener) {
  this.onChangeListener = listener;
};

ObservableThing.prototype.notify = function() {
  if (this.onChangeListener !== null) {
    this.onChangeListener();
  }
};


export default ObservableThing;<commit_msg>ObservableThing is now a class<commit_after>export default class ObservableThing {
	constructor(thing) {
	  this.thing = thing;
    this.onChangeListener = null;
	}

	set(newValue) {
	  this.thing = newValue;
	  this.notify();
	}
	
	get() {
	  return this.thing;
	}

	setChangeListener(listener) {
	  this.onChangeListener = listener;
	}

	notify() {
	  if (this.onChangeListener !== null) {
	    this.onChangeListener();
	  }
	}
}
{'fraction_non_alphanumeric': 0.12841253791708795, 'fraction_numerical': 0.0, 'mean_word_length': 4.15625, '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': '4707449', 'n_tokens_mistral': 335, 'n_tokens_neox': 319, 'n_words': 56}