-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrandomUtils.js
More file actions
98 lines (89 loc) · 2.11 KB
/
Copy pathrandomUtils.js
File metadata and controls
98 lines (89 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Generates a random gamer tag
function generateGamerTag() {
const adjectives = ["Swift", "Fierce", "Savage", "Shadow", "Blaze", "Mystic", "Rapid", "Steel", "Thunder", "Viper",
"Ravage",
"Blaze",
"Shadow",
"Fury",
"Savage",
"Legend",
"Raptor",
"Nyx",
"Rogue",
"Phantom",
"Venom",
"Nova",
"Titan",
"Ninja" ];
const nouns = ["Strike", "Dragon", "Sniper", "Ninja", "Viper", "Raptor", "Phantom", "Reaper", "Titan", "Xero",
"Bolt",
"Raven",
"Jinx",
"Abyss",
"Zephyr",
"Grim",
"Havoc",
"Stryker",
"Cipher",
"Reaper",
"Rapid",
"Apex",
"Enigma",
"Zenith"];
const randomAdjective = adjectives[Math.floor(Math.random() * adjectives.length)];
const randomNoun = nouns[Math.floor(Math.random() * nouns.length)];
return randomAdjective + randomNoun;
}
// Generates a random password
function generatePassword() {
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()";
const length = 10;
let password = "";
for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * characters.length);
password += characters[randomIndex];
}
return password;
}
// Generates a random pet name
function generatePetName() {
const prefixes = ["Fluffy", "Cuddly", "Whiskers", "Paws", "Snuggles", "Biscuit", "Noodle", "Fuzzy", "Sunny", "Max",
"Bella",
"Charlie",
"Lucy",
"Luna",
"Cooper",
"Daisy",
"Bailey",
"Sadie",
"Rocky",
"Molly",
"Buddy",
"Lola",
"Jack",
"Zoe"];
const suffixes = ["Paws", "Whiskers", "Tail", "Snout", "Mittens", "Nose", "Feet", "Ears", "Wag", "Oliver",
"Sophie",
"Milo",
"Roxy",
"Leo",
"Coco",
"Tucker",
"Ruby",
"Oscar",
"Chloe",
"Teddy",
"Penny",
"Winston",
"Rosie",
"Sam",
"Lily"];
const randomPrefix = prefixes[Math.floor(Math.random() * prefixes.length)];
const randomSuffix = suffixes[Math.floor(Math.random() * suffixes.length)];
return randomPrefix + randomSuffix;
}
module.exports = {
generateGamerTag,
generatePassword,
generatePetName
};