<commit_before>'use babel'
import fs from 'fs-plus'

export default function(file) {
  const basePath = file.path.replace(/src\/.*$/, 'node_modules/lodash')
  const paths = fs.listSync(basePath)
  const names = paths.filter(fileName => fileName.endsWith('.js')).map(path => {
    return {
      // docs: fs.readFileSync(path).toString(),
      name: path.replace(/.*\//, '').replace('.js', '')
    }
  })
  return names
}<commit_msg>uses rootPath for lodash<commit_after>'use babel'
/* global atom */
import fs from 'fs-plus'

export default function(file) {
  const rootPath = atom.project.rootDirectories[0].path

  const basePath = rootPath + '/node_modules/lodash'
  const paths = fs.listSync(basePath)
  const names = paths.filter(fileName => fileName.endsWith('.js')).map(path => {
    return {
      // docs: fs.readFileSync(path).toString(),
      name: path.replace(/.*\//, '').replace('.js', '')
    }
  })
  return names
}
{'fraction_non_alphanumeric': 0.18220793140407288, 'fraction_numerical': 0.0010718113612004287, 'mean_word_length': 3.4688995215311005, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1368903', 'n_tokens_mistral': 307, 'n_tokens_neox': 306, 'n_words': 64}