<commit_before>import serialize from 'flockn/serialize';

var serializable = function serializable() {
  this.toJSON = function() {
    return serialize.toJSON(this);
  };

  this.toString = function() {
    return serialize.toString(this);
  };
};

export default serializable;
<commit_msg>Rather change the prototype of the object<commit_after>import serialize from 'flockn/serialize';

var serializable = function serializable(Factory) {
  Factory.prototype.toJSON = function() {
    return serialize.toJSON(this);
  };

  Factory.prototype.toString = function() {
    return serialize.toString(this);
  };
};

export default serializable;

{'fraction_non_alphanumeric': 0.1150855365474339, 'fraction_numerical': 0.0, 'mean_word_length': 4.699115044247788, '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': '2730746', 'n_tokens_mistral': 188, 'n_tokens_neox': 184, 'n_words': 44}