<commit_before>'use strict';

var _ = require('lodash');
var path = require('path');
var limax = require('limax');

function slug(str) {
  return limax(str, {separateNumbers: false}).replace(/[^a-z0-9-]/g, '-');
}

const FIRST_LETTER = 0;
const SECOND_LETTER = 1;
const ONE_CHARACTER = 1;

var Prompts = {
  questions: [
    {
      name: 'name',
      message: 'Please enter the project name:',
      default: () => path.basename(process.cwd())
        .split(/-/g)
        .map(word => `${word.substring(FIRST_LETTER, ONE_CHARACTER).toUpperCase()}${word.substring(SECOND_LETTER)}`)
        .join(' '),
      validate: function (input) {
        return !!input;
      }
    },
    {
      name: 'author',
      message: 'Please enter author name:',
      default: 'Xfive'
    },
    {
      type: 'list',
      name: 'projectType',
      message: 'Please select project type:',<commit_msg>Change author's name suggestion to user name from Git (#276)<commit_after>'use strict';

var _ = require('lodash');
var path = require('path');
var limax = require('limax');
const cp = require('child_process');

function slug(str) {
  return limax(str, {separateNumbers: false}).replace(/[^a-z0-9-]/g, '-');
}

const FIRST_LETTER = 0;
const SECOND_LETTER = 1;
const ONE_CHARACTER = 1;

var Prompts = {
  questions: [
    {
      name: 'name',
      message: 'Please enter the project name:',
      default: () => path.basename(process.cwd())
        .split(/-/g)
        .map(word => `${word.substring(FIRST_LETTER, ONE_CHARACTER).toUpperCase()}${word.substring(SECOND_LETTER)}`)
        .join(' '),
      validate: function (input) {
        return !!input;
      }
    },
    {
      name: 'author',
      message: 'Please enter author name:',
      default: () => {
        try {
          var fullName = cp.execSync('git config user.name', {
            timeout: 2000
          });
          var name = fullName.toString('utf8').trim();
          return name;
        } catch(e) {}
        return undefined;
      }
    },
    {
      type: 'list',
      name: 'projectType',
      message: 'Please select project type:',
{'fraction_non_alphanumeric': 0.1673758865248227, 'fraction_numerical': 0.00851063829787234, 'mean_word_length': 2.574324324324324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '4416819', 'n_tokens_mistral': 710, 'n_tokens_neox': 690, 'n_words': 158}