<commit_before>export default {
  query: function(q = '') {
    const results = this.get(`http://www.dippam.ac.uk/eppi/results?search%5Bper_page%5D=25&search%5Bpage%5D=1&search%5Btotal_pages%5D=644&search%5Bview%5D=table&search%5Bqclean%5D=${q}&search%5Bq%5D=${q}%0A&search%5Bfields%5D=fulltext&search%5Bchrono%5D=on&search%5Bfrom%5D=1801&search%5Bto%5D=1922&search%5Bcat%5D%5B0%5D=on&search%5Bcat%5D%5B1%5D=on&search%5Bcat%5D%5B2%5D=on&search%5Bcat%5D%5B3%5D=on&search%5Bcat%5D%5B4%5D=on&search%5Bsort%5D=title&search%5Bsort_dir%5D=asc`)
    results.then((x) => {document.querySelector("tbody").innerHTML = x})
  },

  get: function(url = '') {
    return new Promise((resolve, reject) => {
      let req = new XMLHttpRequest()
      req.open("GET", url)
      req.onload = () => (req.status === 200) ? resolve(req.response) : reject(Error(req.statusText))
      req.onerror = () => reject(Error("Network Error"))
      req.send()
    })
  }
}<commit_msg>Use class and static method sugar.<commit_after>export default class Search {
  static query(q = '') {
    const results = this.get(`http://www.dippam.ac.uk/eppi/results?search%5Bper_page%5D=25&search%5Bpage%5D=1&search%5Btotal_pages%5D=644&search%5Bview%5D=table&search%5Bqclean%5D=${q}&search%5Bq%5D=${q}%0A&search%5Bfields%5D=fulltext&search%5Bchrono%5D=on&search%5Bfrom%5D=1801&search%5Bto%5D=1922&search%5Bcat%5D%5B0%5D=on&search%5Bcat%5D%5B1%5D=on&search%5Bcat%5D%5B2%5D=on&search%5Bcat%5D%5B3%5D=on&search%5Bcat%5D%5B4%5D=on&search%5Bsort%5D=title&search%5Bsort_dir%5D=asc`)
    results.then((x) => {document.querySelector("tbody").innerHTML = x})
  }

  static get(url = '') {
    return new Promise((resolve, reject) => {
      let req = new XMLHttpRequest()
      req.open("GET", url)
      req.onload = () => (req.status === 200) ? resolve(req.response) : reject(Error(req.statusText))
      req.onerror = () => reject(Error("Network Error"))
      req.send()
    })
  }
}
{'fraction_non_alphanumeric': 0.19700876740587933, 'fraction_numerical': 0.06910778751933987, 'mean_word_length': 6.265917602996255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1630554', 'n_tokens_mistral': 854, 'n_tokens_neox': 830, 'n_words': 69}