Skip to content

Commit

Permalink
Merge pull request #5 from AlessandroMinoccheri/remove-var-in-all-files
Browse files Browse the repository at this point in the history
removed var from all files
  • Loading branch information
AlessandroMinoccheri authored Aug 18, 2022
2 parents a57b879 + 03a6d3b commit 5f71094
Show file tree
Hide file tree
Showing 5 changed files with 1,243 additions and 33 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $ npm install --save human-names
## Usage

```js
var humanNames = require('human-names');
const humanNames = require('human-names');

humanNames.femaleRandom();
//=> Lucy
Expand Down
10 changes: 5 additions & 5 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}

var meow = require('meow');
var humanNames = require('./');
const meow = require('meow');
const humanNames = require('./');

var cli = meow({
const cli = meow({
help: [
'Examples',
' $ human-names',
Expand All @@ -28,6 +28,6 @@ var cli = meow({
].join('\n')
});

var type = cli.flags.type || 'all';
var lang = cli.flags.lang || 'En';
const type = cli.flags.type || 'all';
const lang = cli.flags.lang || 'En';
console.log(cli.flags.all ? humanNames[type + lang.capitalize()].join('\n') : humanNames[type + 'Random' + lang.capitalize()]());
48 changes: 24 additions & 24 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
'use strict';
var uniqueRandomArray = require('unique-random-array');
var femaleHumanNamesEn = require('./data/female-human-names-en.json');
var maleHumanNamesEn = require('./data/male-human-names-en.json');
var allHumanNamesEn = [];

var femaleHumanNamesIt = require('./data/female-human-names-it.json');
var maleHumanNamesIt = require('./data/male-human-names-it.json');
var allHumanNamesIt = [];

var femaleHumanNamesFr = require('./data/female-human-names-fr.json');
var maleHumanNamesFr = require('./data/male-human-names-fr.json');
var allHumanNamesFr = [];

var femaleHumanNamesDe = require('./data/female-human-names-de.json');
var maleHumanNamesDe = require('./data/male-human-names-de.json');
var allHumanNamesDe = [];

var femaleHumanNamesEs = require('./data/female-human-names-es.json');
var maleHumanNamesEs = require('./data/male-human-names-es.json');
var allHumanNamesEs = [];

var femaleHumanNamesNl = require('./data/female-human-names-nl.json');
var maleHumanNamesNl = require('./data/male-human-names-nl.json');
var allHumanNamesNl = [];
const uniqueRandomArray = require('unique-random-array');
const femaleHumanNamesEn = require('./data/female-human-names-en.json');
const maleHumanNamesEn = require('./data/male-human-names-en.json');
let allHumanNamesEn = [];

const femaleHumanNamesIt = require('./data/female-human-names-it.json');
const maleHumanNamesIt = require('./data/male-human-names-it.json');
let allHumanNamesIt = [];

const femaleHumanNamesFr = require('./data/female-human-names-fr.json');
const maleHumanNamesFr = require('./data/male-human-names-fr.json');
let allHumanNamesFr = [];

const femaleHumanNamesDe = require('./data/female-human-names-de.json');
const maleHumanNamesDe = require('./data/male-human-names-de.json');
let allHumanNamesDe = [];

const femaleHumanNamesEs = require('./data/female-human-names-es.json');
const maleHumanNamesEs = require('./data/male-human-names-es.json');
let allHumanNamesEs = [];

const femaleHumanNamesNl = require('./data/female-human-names-nl.json');
const maleHumanNamesNl = require('./data/male-human-names-nl.json');
let allHumanNamesNl = [];

femaleHumanNamesEn.forEach(function (el, i) {
if((maleHumanNamesEn[i] != undefined) && (maleHumanNamesEn[i] != 'undefined')){
Expand Down
Loading

0 comments on commit 5f71094

Please sign in to comment.