<commit_before>'use strict'

var spawn = require('child_process').spawn

function Switcher (version, currentVersion) {
  var installCmd = 'nvm install ' + version;
  installCmd += (currentVersion) ? ' --reinstall-packages-from=' + currentVersion : '';
  
  var binaries = {
    nvm: {
      cmd: process.env.SHELL,
      args: ['-c', 'source $NVM_DIR/nvm.sh; ' + installCmd]
    },

    n: {
      cmd: 'n',
      args: [version]
    }
  }

  function switcher (bin) {
    bin = binaries[bin]
    return spawn(bin.cmd, bin.args, { stdio: 'inherit' })
  }

  switcher.binaries = Object.keys(binaries)
  return switcher
}

module.exports = Switcher
<commit_msg>fix(migrate): fix lint errors<commit_after>'use strict'

var spawn = require('child_process').spawn

function Switcher (version, currentVersion) {
  var installCmd = 'nvm install ' + version
  installCmd += (currentVersion) ? ' --reinstall-packages-from=' + currentVersion : ''

  var binaries = {
    nvm: {
      cmd: process.env.SHELL,
      args: ['-c', 'source $NVM_DIR/nvm.sh; ' + installCmd]
    },

    n: {
      cmd: 'n',
      args: [version]
    }
  }

  function switcher (bin) {
    bin = binaries[bin]
    return spawn(bin.cmd, bin.args, { stdio: 'inherit' })
  }

  switcher.binaries = Object.keys(binaries)
  return switcher
}

module.exports = Switcher

{'fraction_non_alphanumeric': 0.1481203007518797, 'fraction_numerical': 0.0, 'mean_word_length': 3.0090361445783134, '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': '754795', 'n_tokens_mistral': 469, 'n_tokens_neox': 464, 'n_words': 101}