<commit_before>var fs = require('fs');
var main = require('./main');
var info = require('./info');

module.exports = function (verbose) {
  fs.readdir(main.spikesPath, function (error, files) {
    if (error) return main.log(error);

    if (verbose) {
      files.map(info);
    } else {
      main.log(files.join('\n'));
    }
  });
};
<commit_msg>list user spikes and no hidden files<commit_after>var fs = require('fs');
var main = require('./main');
var info = require('./info');

module.exports = function (verbose) {
  var list = function (error, files) {
    if (error) return main.log(error);

    // Don't list hidden files
    files = files.filter(function (f) { return !(/^\./.test(f)); });

    if (verbose) {
      files.map(info);
    } else {
      main.log(files.join('\n'));
    }
  };

  fs.readdir(main.spikesPath, list);

  if (fs.existsSync(main.userSpikesPath)) {
    fs.readdir(main.userSpikesPath, list);
  }
};

{'fraction_non_alphanumeric': 0.19017094017094016, 'fraction_numerical': 0.0, 'mean_word_length': 3.091703056768559, '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': '2297131', 'n_tokens_mistral': 321, 'n_tokens_neox': 315, 'n_words': 72}