<commit_before>/*this is a basic stripped class that should be replaced once a
real adaptor to a particluar storage is adopted*/

class StoreService {
  constructor(/*custom local service*/storage) {
    /*this particular approach polutes the localStorage namespace,
    so this is an unscalable, unrealistic approach to a storage
    service*/
    this._storage = storage;
  }

  getAllArticles() {
    /* get all elements*/
    return Object
      .keys(this._storage)
      .map(key => JSON.parse(this._storage.getItem(key)))
  }

  getArticle(/*id base*/ id) { }

  set article(article) {
    this._storage.setItem(article.id, article);
  }

  removeArticle(id) {
    this._storage.removeItem(id)
  }
}

export default new StoreService(/*window*/localStorage);<commit_msg>...stringify<commit_after>/*this is a basic stripped class that should be replaced once a
real adaptor to a particluar storage is adopted*/

class StoreService {
  constructor(/*custom local service*/storage) {
    /*this particular approach polutes the localStorage namespace,
    so this is an unscalable, unrealistic approach to a storage
    service*/
    this._storage = storage;
  }

  getAllArticles() {
    /* get all elements*/
    return Object
      .keys(this._storage)
      .map(key => JSON.parse(this._storage.getItem(key)))
  }

  getArticle(id) { }

  set article(article) {
    this._storage.setItem(article.id, JSON.stringify(article));
  }

  removeArticle(id) {
    this._storage.removeItem(id)
  }
}

export default new StoreService(/*window*/localStorage);
{'fraction_non_alphanumeric': 0.10932475884244373, 'fraction_numerical': 0.0, 'mean_word_length': 3.484149855907781, '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': '4721875', 'n_tokens_mistral': 462, 'n_tokens_neox': 447, 'n_words': 131}