<commit_before>'use strict';
var exec = require('child_process').exec;
var which = require('which');

module.exports = whoami;

function whoami(opts, cb) {
  if ('function' === typeof opts) {
    cb = opts;
    opts = {};
  }

  which('npm', callNpm);

  function callNpm(err, pathToNpm) {
    if (err) {
      return cb(err);
    }
    //var cmd = 'cd ' + process.cwd() + ' && ' + pathToNpm + ' whoami';
    var cmd = pathToNpm + ' whoami';
    if (opts.registry) {
      cmd += ' --registry ' + opts.registry;
    }
    exec(cmd, {encoding:'utf8'}, handleResult);
  }

  function handleResult(err, stdout, stderr) {
    cb(err, stdout && stdout.trim());<commit_msg>remove comment leftover from debugging<commit_after>'use strict';
var exec = require('child_process').exec;
var which = require('which');

module.exports = whoami;

function whoami(opts, cb) {
  if ('function' === typeof opts) {
    cb = opts;
    opts = {};
  }

  which('npm', callNpm);

  function callNpm(err, pathToNpm) {
    if (err) {
      return cb(err);
    }
    var cmd = pathToNpm + ' whoami';
    if (opts.registry) {
      cmd += ' --registry ' + opts.registry;
    }
    exec(cmd, {encoding:'utf8'}, handleResult);
  }

  function handleResult(err, stdout, stderr) {
    cb(err, stdout && stdout.trim());
{'fraction_non_alphanumeric': 0.17327117327117328, 'fraction_numerical': 0.001554001554001554, 'mean_word_length': 3.0759493670886076, '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': '7399520', 'n_tokens_mistral': 454, 'n_tokens_neox': 442, 'n_words': 105}