mirror of https://github.com/tycrek/ass
parent
31eafd787e
commit
82aaafa990
@ -0,0 +1,19 @@
|
||||
const fs = require('fs-extra');
|
||||
const adjectiveList = fs.readFileSync("./gfycat/adjectives.txt", "utf-8").split('\n');
|
||||
const animalsList = fs.readFileSync("./gfycat/animals.txt", "utf-8").split('\n');
|
||||
|
||||
function genString(adjCount) {
|
||||
let adjectivesString = "";
|
||||
for (i = 0; i < adjCount; i++) adjectivesString += genAdjective();
|
||||
return adjectivesString + genAnimal();
|
||||
};
|
||||
|
||||
function genAnimal() {
|
||||
return animalsList[Math.floor(Math.random()*animalsList.length)];
|
||||
}
|
||||
|
||||
function genAdjective() {
|
||||
return adjectiveList[Math.floor(Math.random()*adjectiveList.length)] + "-";
|
||||
}
|
||||
|
||||
module.exports = (adjectives) => genString(adjectives);
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue