Skip to content

Commit

Permalink
Create generateRandomFileName.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AsynchronousAI authored Jan 29, 2024
1 parent aadaf37 commit ea1db1f
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions src/scripts/generateRandomFileName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
const adjectives = [
'awesome',
'fantastic',
'amazing',
'cool',
'brilliant',
'spiritual',
'amused',
'obscene',
'willing',
'smelly',
'bright',
'colossal',
'abstracted',
'understood',
'whispering',
'ignorant',
'momentous',
'black',
'agonizing',
'fluffy',
'regular',
'drunk',
'harsh',
'open',
'closed',
'entertaining',
'jobless',
'periodic',
'filthy',
'fast',
'quick',
'strong',
'typed',
'simple',
'sunny',
];
const nouns = [
'project',
'repo',
'work',
'code',
'app',
'order',
'butter',
'ticket',
'smoke',
'birds',
'rock',
'wing',
'fog',
'sky',
'water',
'cream',
'bikes',
'shoes',
'vegetable',
'cow',
'fork',
'haircut',
'rose',
'tree',
'maze',
'piano',
'ball',
'music',
'food',
'shower',
'window',
'umbrella',
'fork',
'plant',
'towel',
];

export default function generateRandomFileName() {
const randomAdjective =
adjectives[Math.floor(Math.random() * adjectives.length)];
const randomNoun = nouns[Math.floor(Math.random() * nouns.length)];
const randomNumber = Math.floor(Math.random() * 100);

return `${randomAdjective}-${randomNoun}-${randomNumber}`;
}

0 comments on commit ea1db1f

Please sign in to comment.