<commit_before>'use strict';
var env = process.env;
var home = env.HOME;
var user = envLOGNAME || env.USER || env.LNAME || env.USERNAME;

module.exports = function getUserSettingsDir(subDir) {
  var baseDir = null;

  switch (process.platform) {
    case 'win32':
      baseDir =  env.APPDATA;
      break;
    case 'darwin':
      if (home) {
        baseDir = home;
      }
      else if (user) {
        baseDir = '/home/' + user;
      }
    case 'linux':
      if (home) {
        baseDir = home;
      }
      else if (user) {
        baseDir = process.getuid() === 0 ? '/root' : '/home/' + user;
      }
    default:
      if (home) {
        baseDir = home;
      }
      break;
  }

  if (baseDir && subDir) {
    return path.join(baseDir, subDir);
  }

  return baseDir;
}
<commit_msg>fix load error<commit_after>'use strict';
var env = process.env;
var home = env.HOME;
var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME;

module.exports = function getUserSettingsDir(subDir) {
  var baseDir = null;

  switch (process.platform) {
    case 'win32':
      baseDir =  env.APPDATA;
      break;
    case 'darwin':
      if (home) {
        baseDir = home;
      }
      else if (user) {
        baseDir = '/home/' + user;
      }
    case 'linux':
      if (home) {
        baseDir = home;
      }
      else if (user) {
        baseDir = process.getuid() === 0 ? '/root' : '/home/' + user;
      }
    default:
      if (home) {
        baseDir = home;
      }
      break;
  }

  if (baseDir && subDir) {
    return path.join(baseDir, subDir);
  }

  return baseDir;
}

{'fraction_non_alphanumeric': 0.14384422110552764, 'fraction_numerical': 0.0037688442211055275, 'mean_word_length': 1.8858695652173914, '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': '6353939', 'n_tokens_mistral': 556, 'n_tokens_neox': 547, 'n_words': 138}