39 lines
2.4 KiB
JavaScript
39 lines
2.4 KiB
JavaScript
|
|
||
|
var randomstring = require("randomstring");
|
||
|
|
||
|
function charityGen() {
|
||
|
ffnames = ["Quren","Wendy","Erica","Rebecca","Tabitha","Yennifer","Ulanda","Irene","Omara","Penelope","Agne","Sarah","Diane","Febroch","Gillian","Hannah","Jessica","Karen","Laura","Zoe","Xephod","Caitlyn","Violet","Betty","Noreen","Martha"]
|
||
|
mfnames = ["Qwin","William","Eric","Robert","Thomas","Yakov","Umber","Ian","Odin","Peter","Adam","Sam","Daniel","Fredrich","Geoff","Hubert","Jack","Kevin","Liam","Zack","Xaphod","Carl","Victor","Benjamin","Nathan","Mark"]
|
||
|
lnames = ["Qwerner","Windburg","Eoinson","Rasputin","Thunburgler","Yankovic","Udenminster","Irason","Onglangling","Petrovic","Ainsly","Sumpworth","Donnington","Fontain","Goodly","Henderson","Jillersworth","Kurteen","Luth","Zundar","Xembi","Coats","Veloure","Bunglesworth","Nempham","Macklesmith"]
|
||
|
establishments = ["Trust","Foundation","Service","Association","Fund","Philanthropic Enterprise","Centre","Endowment","Charity","Network","Service"]
|
||
|
acronym = randomstring.generate({length:3,charset: 'alphabetic'}).toUpperCase()
|
||
|
rand = Math.floor((Math.random() * 7) + 1)
|
||
|
charityString=""
|
||
|
|
||
|
switch(rand) {
|
||
|
|
||
|
case 1 :
|
||
|
charityString = "The "+ffnames[Math.floor(Math.random() * ffnames.length)]+" "+establishments[Math.floor(Math.random() * establishments.length)]
|
||
|
break
|
||
|
case 2:
|
||
|
charityString = "The "+ffnames[Math.floor(Math.random() * ffnames.length)]+" "+ lnames[Math.floor(Math.random() * lnames.length)] +" "+establishments[Math.floor(Math.random() * establishments.length)]
|
||
|
break
|
||
|
case 3:
|
||
|
charityString = "The "+mfnames[Math.floor(Math.random() * mfnames.length)]+" "+establishments[Math.floor(Math.random() * establishments.length)]
|
||
|
break
|
||
|
case 4:
|
||
|
charityString = "The "+mfnames[Math.floor(Math.random() * mfnames.length)]+" "+ lnames[Math.floor(Math.random() * lnames.length)] +" "+establishments[Math.floor(Math.random() * establishments.length)]
|
||
|
break
|
||
|
case 5:
|
||
|
charityString = "The "+lnames[Math.floor(Math.random() * lnames.length)] +" "+establishments[Math.floor(Math.random() * establishments.length)]
|
||
|
break
|
||
|
default:
|
||
|
charityString = acronym+" "+establishments[Math.floor(Math.random() * establishments.length)]
|
||
|
}
|
||
|
|
||
|
|
||
|
return charityString
|
||
|
}
|
||
|
|
||
|
|
||
|
module.exports = charityGen
|