<commit_before>'use strict';

var findNodeModules = require('find-node-modules');
var findup          = require('findup-sync');
var slice           = [].slice;

/**
 * Find the requested path inside a list of candidate directories.
 *
 * @param  {String} path        Path to locate.
 * @param  {Array}  directories Array of directories.
 * @return {String}             Located path, or null if not found.
 */
function findPath(path, directories) {
  var cwd = directories[0];

  if (!cwd) {
    return null;
  }

  var modulePath = findup(path, {cwd: cwd});

  console.log(modulePath);

  return modulePath || findPath(path, slice.call(directories, 1));
}

/**
 * Find the nearest path contained inside a node_modules directory.
 *
 * @param  {String}  path     Path to locate.
 * @param  {Object}  options  Directory to scan (optional, defaults to current directory).<commit_msg>Stupidly left a console.log call in the source<commit_after>'use strict';

var findNodeModules = require('find-node-modules');
var findup          = require('findup-sync');
var slice           = [].slice;

/**
 * Find the requested path inside a list of candidate directories.
 *
 * @param  {String} path        Path to locate.
 * @param  {Array}  directories Array of directories.
 * @return {String}             Located path, or null if not found.
 */
function findPath(path, directories) {
  var cwd = directories[0];

  if (!cwd) {
    return null;
  }

  return findup(path, {cwd: cwd}) || findPath(path, slice.call(directories, 1));
}

/**
 * Find the nearest path contained inside a node_modules directory.
 *
 * @param  {String}  path     Path to locate.
 * @param  {Object}  options  Directory to scan (optional, defaults to current directory).
{'fraction_non_alphanumeric': 0.11944604731679169, 'fraction_numerical': 0.002308136180034622, 'mean_word_length': 3.1783132530120484, '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': '269454', 'n_tokens_mistral': 525, 'n_tokens_neox': 508, 'n_words': 180}