<commit_before>const fountain = require('fountain-generator');

module.exports = fountain.Base.extend({
  writing() {
    const name = this.options.name || 'directive';
    const lowerCase = string => string.charAt(0).toLowerCase() + string.slice(1);
    const path = this.options.dir ? `src/app/${this.options.dir}` : `src/app`;
    const typings = this.options.dir ? this.options.dir.split('/').reduce(prev => `../${prev}`, '../../typings/index.d.ts') : '../../typings/index.d.ts';
    const props = {
      directiveName: lowerCase(name),
      modules: this.config.get('props').modules,
      js: this.config.get('props').js,
      framework: 'angular1',
      name,
      typings
    };
    this.copyTemplate(`src/app/directive.js`, `${path}/${name}.js`, props);
    this.copyTemplate(`src/app/directive.spec.js`, `${path}/${name}.spec.js`, props);
  }
});<commit_msg>Update index.js<commit_after>const fountain = require('fountain-generator');

module.exports = fountain.Base.extend({
  writing() {
    const name = this.options.name || 'directive';
    const lowerCase = string => string.charAt(0).toLowerCase() + string.slice(1);
    const path = this.options.dir ? `src/app/${this.options.dir}` : `src/app`;
    const typings = this.options.dir ? this.options.dir.split('/').reduce(prev => `../${prev}`, '../../typings/index.d.ts') : '../../typings/index.d.ts';
    const props = {
      directiveName: lowerCase(name),
      modules: this.config.get('props').modules,
      js: this.config.get('props').js,
      framework: 'angular1',
      name,
      typings
    };
    this.copyTemplate(`src/directives/directive.js`, `${path}/${name}/${name}.js`, props);
    this.copyTemplate(`src/directives/directive.spec.js`, `${path}/${name}/${name}.spec.js`, props);
  }
});
{'fraction_non_alphanumeric': 0.21653543307086615, 'fraction_numerical': 0.003374578177727784, 'mean_word_length': 3.371007371007371, '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': '899836', 'n_tokens_mistral': 582, 'n_tokens_neox': 587, 'n_words': 91}