<commit_before>const stubbedStorage = {}
'getItem setItem removeItem'
  .split(' ')
  .forEach(method => (stubbedStorage[method] = () => nil))

let localStorage
try {
  localStorage = window.localStorage
} catch(e if e instanceof ReferenceError) {
  localStorage = stubbedStorage
}

const storage = {
  get: key => {
    try {
      // (<EMAIL>) Values that were set before values were stringified might fail to parse, so we return the raw storage item if we can't parse it
      return JSON.parse(localStorage.getItem(key))
    } catch (e) {<commit_msg>Attempt to fix syntax error in storage helper<commit_after>const stubbedStorage = {}
'getItem setItem removeItem'
  .split(' ')
  .forEach(method => (stubbedStorage[method] = () => nil))

let localStorage
try {
  localStorage = window.localStorage
} catch (e) {
  if (e instanceof ReferenceError) {
    localStorage = stubbedStorage
  }
}

const storage = {
  get: key => {
    try {
      // (<EMAIL>) Values that were set before values were stringified might fail to parse, so we return the raw storage item if we can't parse it
      return JSON.parse(localStorage.getItem(key))
    } catch (e) {
{'fraction_non_alphanumeric': 0.10928013876843018, 'fraction_numerical': 0.0, 'mean_word_length': 3.710204081632653, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5236757', 'n_tokens_mistral': 341, 'n_tokens_neox': 339, 'n_words': 118}