<commit_before>export const VERSION = '1.0.0'

const callAndReply = (unsubscribe, text) =>
  (e, reply) => {
    unsubscribe()
    reply(text)
  }

const justReply = (text) => (e, reply) => reply(text)

export default function log (networks) {
  console.log('log plugin v' + VERSION + ' initialized')

  let unsubscribe
  const subscribe = () => {
    unsubscribe = networks.on('event', e => console.log('event:', e))
  }

  return {
    'disable': callAndReply(unsubscribe, 'Disabled logging.'),
    'enable': callAndReply(unsubscribe, 'Enabled logging.'),
    'default': justReply('Usage: /log disable|enable')
  }
}
<commit_msg>log: fix typo<commit_after>export const VERSION = '1.0.0'

const callAndReply = (unsubscribe, text) =>
  (e, reply) => {
    unsubscribe()
    reply(text)
  }

const justReply = (text) => (e, reply) => reply(text)

export default function log (networks) {
  console.log('log plugin v' + VERSION + ' initialized')

  let unsubscribe
  const subscribe = () => {
    unsubscribe = networks.on('event', e => console.log('event:', e))
  }

  return {
    'disable': callAndReply(unsubscribe, 'Disabled logging.'),
    'enable': callAndReply(subscribe, 'Enabled logging.'),
    'default': justReply('Usage: /log disable|enable')
  }
}

{'fraction_non_alphanumeric': 0.16746031746031745, 'fraction_numerical': 0.004761904761904762, 'mean_word_length': 3.9450980392156865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4688945', 'n_tokens_mistral': 416, 'n_tokens_neox': 417, 'n_words': 102}