<commit_before>function checkExistance(dir, translations){
  translations.forEach((translation) => {
    try {
      require(`${dir}\\${translation[0]}`)
    } catch (e) {
      console.log(`ERROR:::FILE MISSING: ${translation[0]}`);
    }
  })
}

module.exports = checkExistance<commit_msg>- throw an error if the file does not exist and return false - return true if the file does exist<commit_after>function checkExistance(dir, translations){
  let exist = true
  translations.forEach((translation) => {
    try {
      require(`${dir}\\${translation[0]}`)
    } catch (e) {
      error = false
      throw new Error(`${translation[1]} TRANSLATION FILE MISSING: ${translation[0]}`)
    }
  })
  return exist
}

module.exports = checkExistance
{'fraction_non_alphanumeric': 0.15033557046979865, 'fraction_numerical': 0.006711409395973154, 'mean_word_length': 3.8129032258064517, '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': '1972169', 'n_tokens_mistral': 224, 'n_tokens_neox': 220, 'n_words': 55}