<commit_before>const spookyDescriptions = [
  'Not Spooky - It is safe but always be alert for skeletons',
  'Spoopy - No skeletons nearby but I\'m kind of scared anyway',
  'P Spoopy - Imminent danger of skeletons',
  'Spooky - There is a skeleton right behind you look out',
  '2Spooky - It is too late a skeleton is inside you'
]

exports.getSpookyLevel = function () {
  return Math.floor(Math.random() * spookyDescriptions.length)
}

exports.getSpookyDescription = function (spookyLevel) {
  spookyLevel = Math.min(spookyLevel, spookyDescriptions.length - 1) || spookyDescriptions.length - 1
  return spookyDescriptions[spookyLevel]
}<commit_msg>Converted the spookyMeter module to work as both a CommonJS module and an ES6 module.<commit_after>(function () {
  let spookyMeter = {}

  if (typeof module !== 'undefined' && module.exports) {
    exports = module.exports = spookyMeter
  } else if (typeof exports !== 'undefined') {
    exports.spookyMeter = spookyMeter
  } else {
    this.spookyMeter = spookyMeter
  }

  const spookyDescriptions = [
    'Not Spooky - It is safe but always be alert for skeletons',
    'Spoopy - No skeletons nearby but I\'m kind of scared anyway',
    'P Spoopy - Imminent danger of skeletons',
    'Spooky - There is a skeleton right behind you look out',
    '2Spooky - It is too late a skeleton is inside you'
  ]

  spookyMeter.getSpookyLevel = function () {
    return Math.floor(Math.random() * spookyDescriptions.length)
  }

  spookyMeter.getSpookyDescription = function (spookyLevel) {
    spookyLevel = Math.min(spookyLevel, spookyDescriptions.length - 1) || spookyDescriptions.length - 1
    return spookyDescriptions[spookyLevel]
  }
}).call(this || window)
{'fraction_non_alphanumeric': 0.0965476887068461, 'fraction_numerical': 0.004095962551199532, 'mean_word_length': 3.8857142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3067125', 'n_tokens_mistral': 580, 'n_tokens_neox': 558, 'n_words': 167}