name.js (1439B)
1 // pinched from https://stackoverflow.com/questions/16826200/javascript-silly-name-generator 2 let name_parts = [ 3 ["Runny", "Buttercup", "Dinky", "Stinky", "Crusty", 4 "Greasy","Gidget", "Cheesypoof", "Lumpy", "Wacky", "Tiny", "Flunky", 5 "Fluffy", "Zippy", "Doofus", "Gobsmacked", "Slimy", "Grimy", "Salamander", 6 "Oily", "Burrito", "Bumpy", "Loopy", "Snotty", "Irving", "Egbert"], 7 8 ["Waffer", "Lilly","Rugrat","Sand", "Fuzzy","Kitty", 9 "Puppy", "Snuggles","Rubber", "Stinky", "Lulu", "Lala", "Sparkle", "Glitter", 10 "Silver", "Golden", "Rainbow", "Cloud", "Rain", "Stormy", "Wink", "Sugar", 11 "Twinkle", "Star", "Halo", "Angel"], 12 ["Snicker", "Buffalo", "Gross", "Bubble", "Sheep", 13 "Corset", "Toilet", "Lizard", "Waffle", "Kumquat", "Burger", "Chimp", "Liver", 14 "Gorilla", "Rhino", "Emu", "Pizza", "Toad", "Gerbil", "Pickle", "Tofu", 15 "Chicken", "Potato", "Hamster", "Lemur", "Vermin"], 16 ["face", "dip", "nose", "brain", "head", "breath", 17 "pants", "shorts", "lips", "mouth", "muffin", "butt", "bottom", "elbow", 18 "honker", "toes", "buns", "spew", "kisser", "fanny", "squirt", "chunks", 19 "brains", "wit", "juice", "shower"], 20 ]; 21 22 /** create a new random name from the parts in name_parts **/ 23 function generateName() { 24 name = ''; 25 for (let i = 0; i < name_parts.length; i++) { 26 if (i > 0 && i < 3) { 27 name += ' '; 28 } 29 const ii = Math.random() * name_parts[i].length; 30 name += name_parts[i][Math.floor(ii)]; 31 } 32 return name; 33 }