<commit_before>const ora = require('ora')
const childProcess = require('child_process')

function bigFactorial (number) {
  return new Promise((resolve, reject) => {
    const child = childProcess.fork(`${__dirname}/factorial-worker.js`)

    child.on('message', data => {
      child.kill()

      resolve(data)
    })

    child.send(number)
  })
}

const number = parseInt(process.argv[2])

const spinner = ora(`Calculating factorial for ${number}`).start()

bigFactorial(number)
  .then(result => {
    spinner.succeed(`Calculating factorial for ${number} is ${result}`)
  })<commit_msg>fix: handler invalid parameter case<commit_after>const ora = require('ora')
const childProcess = require('child_process')

function bigFactorial (number) {
  return new Promise((resolve, reject) => {
    const child = childProcess.fork(`${__dirname}/factorial-worker.js`)

    child.on('message', data => {
      child.kill()

      resolve(data)
    })

    child.send(number)
  })
}

const number = parseInt(process.argv[2])

if (!Number.isNaN(number)) {
  const spinner = ora(`Calculating factorial for ${number}`).start()

  bigFactorial(number)
    .then(result => {
      spinner.succeed(`Calculating factorial for ${number} is ${result}`)
    })
} else {
  console.log('you need to pass number as parameter')
}
{'fraction_non_alphanumeric': 0.154434250764526, 'fraction_numerical': 0.0015290519877675841, 'mean_word_length': 4.133333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2072567', 'n_tokens_mistral': 417, 'n_tokens_neox': 405, 'n_words': 90}