@xaroth8088/random-names
Version:
A random name generator for all kinds of things
44 lines (43 loc) • 6.18 kB
JavaScript
export default function foods() {
let names;
let rnd;
let rnd2;
let rnd3;
const names1 = ['Baked', 'Barbecued', 'Basted', 'Blanched', 'Braised', 'Breaded', 'Brined', 'Broasted', 'Cooked', 'Cured', 'Deep-Fried', 'Dried', 'Dry-Roasted', 'Engine-Cooked', 'Fire-Grilled', 'Fire-Roasted', 'Fried', 'Gentle-Fried', 'Grilled', 'Infused', 'Marinated', 'Oven-Baked', 'Oven-Grilled', 'Pan-Fried', 'Pickled', 'Poached', 'Pressure-Cooked', 'Pressure-Fried', 'Roasted', 'Sautéed', 'Seared', 'Shallow-Fried', 'Simmered', 'Slow-Cooked', 'Smoked', 'Steamed', 'Stewed', 'Stir-Fried', 'Stuffed', 'Tea-Smoked', 'Tenderized', 'Thermal-Cooked'];
const names2 = ['Almonds & Avocado', 'Apple & Lavender', 'Apples & Mustard', 'Apples & Walnut', 'Apricot & Basil', 'Apricots & Honey', 'Aspargus', 'Basil & Cinnamon', 'Basil & Clove', 'Basil & Lime', 'Basil & Mint', 'Beets & Lemon', 'Beets & Orange', 'Bittersweet', 'Black Pepper', 'Blackberry & Ginger', 'Blueberry', 'Blueberry & Mushroom', 'Butter', 'Carrot & Corriander', 'Carrot & Violet', 'Potatoes &', 'Rice &', 'Pasta & ', 'Carrots & Ginger', 'Casserole of', 'Cheese &', 'Chestnuts &', 'Chilli', 'Cinnamon', 'Cinnamon & Thyme', 'Cocoa & Mushroom', 'Coconut', 'Coconut & Ginger', 'Confit of', 'Coriander & Lemon', 'Cranberry', 'Creamy', 'Cucumber &', 'Cucumber & Lime', 'Curry of', 'Dark Ale', 'Dark Beer', 'Easter-Style', 'Egg & Beans', 'Egg & Beet', 'Egg & Coconut', 'Fennel', 'Fennel & Garlic', 'Fennel & Lemon', 'Fennel & Lime', 'Fennel & Orange', 'Figs & Olive', 'Forest', 'Garlic', 'Garlic & Ginger', 'Garlic & Lime', 'Garlic & Onion', 'Garlic & Rosemary', 'Garlic & Tomato', 'Ginger', 'Ginger & Honey', 'Hazelnut', 'Herbs &', 'Honey', 'Honey & Almond', 'Honey & Nuts', 'Honey & Thyme', 'Honey-Coated', 'Hot & Spicy', 'Hot & Sweet', 'Jasmine', 'Juniper', 'Lemon', 'Lemongrass', 'Light Ale', 'Light Beer', 'Lime', 'Lime & Ginger', 'Lime-Coated', 'Mango & Pine', 'Mint', 'Mint & Berry', 'Mint & Mustard', 'Mint & Orange', 'Mountain', 'Mushroom', 'Mushroom & Apricot', 'Mushroom & Garlic', 'Mushroom & Rosemary', 'Mustard', 'Mustard & Garlic', 'Mustard & Rosemary', 'Mustard & Thyme', 'Northern-Style', 'Nuts &', 'Olive', 'Olives & Mustard', 'Onions & Cream', 'Onions & Tomato', 'Orange', 'Orange & Mustard', 'Orange & Olive', 'Oregano', 'Paprika', 'Parmesan', 'Parsnip & Pear', 'Peach & Vinegar', 'Peanuts &', 'Peas & Mushroom', 'Pepper', 'Pepper & Garlic', 'Pepper & Lime', 'Pepper & Mango', 'Peppermint', 'Pine', 'Pineapple', 'Raspberry & Peanut', 'Red Whine', 'Rhubarb', 'Rosemary', 'Rosemary & Onion', 'Saffron', 'Saffron & Shallot', 'Salt & Pepper', 'Salt & Savory', 'Salted', 'Salty & Sour', 'Savory', 'Sour', 'Sour & Cream', 'Souther-Style', 'Soy', 'Stew of', 'Sugar', 'Sweet & Fresh', 'Sweet & Savory', 'Sweet & Spicy', 'Sweet \'n Sour', 'Thyme & Parsley', 'Tomatos &', 'Truffles &', 'Vanilla', 'Vanilla & Mint', 'Vegetables &', 'Vinegar', 'Walnuts &', 'Wasabi', 'Watercress', 'Western-Style', 'White Wine', 'Yogurt'];
const names3 = ['Bear', 'Beef', 'Boar', 'Chicken', 'Duck', 'Horse', 'Lamb', 'Mammoth', 'Mutton', 'Ostrich', 'Pheasant', 'Pigeon', 'Pork', 'Quail', 'Rabbit', 'Turkey', 'Venison', 'Yak'];
const names4 = ['Clams', 'Cockles', 'Cod', 'Crab', 'Crocodile', 'Alligator', 'Fish', 'Frog', 'Herring', 'Lobster', 'Mussels', 'Oysters', 'Prawns', 'Salmon', 'Scallops', 'Shrimps', 'Snapper', 'Trout', 'Tuna'];
const names5 = ['Bake', 'Bread', 'Bruschetta', 'Buns', 'Calzone', 'Chestnuts', 'Chutney', 'Flatbread', 'Forest Mushrooms', 'Gratin', 'Kebabs', 'Lasagne', 'Linguine', 'Moussaka', 'Nut Mix', 'Omelette', 'Pasta', 'Pie', 'Pizza', 'Potato Wedges', 'Potatoes', 'Rice', 'Risotto', 'Roll', 'Salad', 'Sandwich', 'Scrambled Egg', 'Soup', 'Spring Greens', 'Spring Vegetables', 'Stuffed Bread', 'Taco', 'Tart', 'Tofu', 'Tortilla', 'Vegetable Mix', 'Vegetables', 'Walnuts', 'Winter Greens', 'Winter Vegetables'];
const names6 = ['Almond', 'Apple', 'Avocado', 'Banana', 'Blueberry', 'Caramel', 'Cardamom', 'Cashew', 'Cherry', 'Chestnut', 'Chocolate', 'Cinnamon', 'Cocoa', 'Coconut', 'Coffee', 'Cranberry', 'Dark Chocolate', 'Date', 'Elderberry', 'Ginger', 'Gooseberry', 'Grape', 'Grapefruit', 'Guava', 'Hazelnut', 'Honey', 'Kiwi', 'Lemon', 'Licorice', 'Lime', 'Mandarin', 'Mango', 'Melon', 'Milk Chocolate', 'Mint', 'Nutmeg', 'Orange', 'Papaya', 'Passion Fruit', 'Peach', 'Peanut', 'Pecan', 'Pineapple', 'Pistachio', 'Plum', 'Praline', 'Raspberry', 'Red Wine', 'Rum', 'Saffron', 'Strawberry', 'Vanilla', 'Walnut', 'White Chocolate', 'White Wine'];
const names7 = ['Bombe', 'Bonbons', 'Bread', 'Buns', 'Cake', 'Candy', 'Cheesecake', 'Cobbler', 'Cone', 'Cookies', 'Crispies', 'Crumble', 'Custard', 'Delight', 'Doughnut', 'Fruit Salad', 'Fruitcake', 'Fudge', 'Genoise', 'Gingerbread', 'Ice Cream', 'Ice Lollies', 'Jam', 'Jelly', 'Milk', 'Molten Cake', 'Mooncake', 'Pancakes', 'Pastry', 'Pavlova', 'Pie', 'Pound Cake', 'Pud', 'Pudding', 'Roll', 'Snacks', 'Sorbet', 'Soufflé', 'Split', 'Steamed Pudding', 'Strudel', 'Sundae', 'Surprise', 'Tart', 'Tarte Tatin', 'Toast', 'Toffee', 'Trifle', 'Wafer', 'Waffles', 'Whip', 'Yogurt'];
const i = Math.floor(Math.random() * 10);
{
if (i < 6) {
rnd = Math.floor(Math.random() * names1.length);
rnd2 = Math.floor(Math.random() * names2.length);
if (i < 2) {
rnd3 = Math.floor(Math.random() * names3.length);
names = `${names1[rnd]} ${names2[rnd2]} ${names3[rnd3]}`;
} else if (i < 4) {
rnd3 = Math.floor(Math.random() * names4.length);
names = `${names1[rnd]} ${names2[rnd2]} ${names4[rnd3]}`;
} else {
rnd3 = Math.floor(Math.random() * names5.length);
names = `${names1[rnd]} ${names2[rnd2]} ${names5[rnd3]}`;
}
} else {
rnd = Math.floor(Math.random() * names6.length);
rnd2 = Math.floor(Math.random() * names7.length);
if (i < 8) {
rnd3 = Math.floor(Math.random() * names6.length);
while (rnd3 === rnd) {
rnd3 = Math.floor(Math.random() * names6.length);
}
names = `${names6[rnd]} and ${names6[rnd3]} ${names7[rnd2]}`;
} else {
names = `${names6[rnd]} ${names7[rnd2]}`;
}
}
return names;
}
}