<commit_before>import riot from 'riot'
import jsonp from 'browser-jsonp'

class ITunesStore {
  constructor() {
    riot.observable(this);
    this.bindEvents();
  }

  bindEvents() {
    this.on(riot.EVT.queryITunesStore, (term, media) => {
      jsonp({
        url: 'https://itunes.apple.com/search',
        data: { term: term, media: media },
        success: data => this.trigger(riot.EVT.queryITunesStoreSuccess, data),
        error: err => alert(err)
      });
    });
  }
}

// add store to riot control
let iTunesStore = new ITunesStore();
riot.control.addStore(iTunesStore);<commit_msg>remove dumb es6 class stuff<commit_after>import riot from 'riot';
import jsonp from 'browser-jsonp';

(function () {
  var iTunesStore = riot.observable();

  iTunesStore.on(riot.EVT.queryITunesStore, (term, media) => {
    jsonp({
      url: 'https://itunes.apple.com/search',
      data: { term: term, media: media },
      success: data => iTunesStore.trigger(riot.EVT.queryITunesStoreSuccess, data),
      error: err => alert(err)
    });
  });

  riot.control.addStore(iTunesStore);
})();
{'fraction_non_alphanumeric': 0.153987167736022, 'fraction_numerical': 0.0009165902841429881, 'mean_word_length': 3.350597609561753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '6784889', 'n_tokens_mistral': 381, 'n_tokens_neox': 358, 'n_words': 76}