-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add filename generator * Placeholder names * Update new.tsx * Update new.tsx * Delete src/fileName.ts * Update new.tsx * Update new.tsx * Create generateRandomFileName.ts * Update new.tsx * Update new.tsx * Update new.tsx Co-authored-by: Nathan Wang <[email protected]> * Update pages/new.tsx Co-authored-by: Nathan Wang <[email protected]> --------- Co-authored-by: Nathan Wang <[email protected]>
- Loading branch information
1 parent
bde52dc
commit d1a84d8
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}`; | ||
} |