Tapage/app/usernameGenerate.ts

62 lines
933 B
TypeScript
Raw Normal View History

const prenom = [
"Stéphane",
"Hubert",
"Alphonse",
"Marjolaine",
"Cathy",
"Patrick",
"Agathe",
"Erneste",
2024-08-09 16:35:57 +00:00
"Gertrude",
"Eustache",
"Cunégonde",
"Barnabé",
"Arsène",
"Clotilde",
"Adélaïde",
"Rosalie",
"Firmin",
"Hortense",
"Gustave",
"Odile",
"Gontran",
"Léopoldine",
"Achille",
"Eugène",
"Gédéon",
]
const nom = [
"Falzar",
"Globule",
"Bermuda",
"Zigounette",
"Pissenlit",
"Détritus",
2024-08-09 16:35:57 +00:00
"Moufette",
"Panade",
"Boulet",
"Moustache",
"Tapage",
"Bidule",
"Patate",
"Clafoutis",
"Crouton",
"Bibelot",
"Pinceau",
"Chiffon",
"Trompette",
"Chipolata",
"Boussole",
"Touillette",
"Fanfreluche",
"Grenouille",
"Pamplemousse"
]
export function getUsername(){
const prenomIndex = Math.floor(Math.random() * prenom.length)
const nomIndex = Math.floor(Math.random() * nom.length)
return prenom[prenomIndex] + " " + nom[nomIndex]
}