From c324aabf0ab5065ad53eecdb2653e64cc720f6d2 Mon Sep 17 00:00:00 2001 From: Graham Barber Date: Tue, 11 Nov 2025 05:53:06 +0000 Subject: [PATCH] perf: improve randomness --- data/animals.json | 2090 ++++++++++++++++++++++----------------------- mod.ts | 17 +- 2 files changed, 1024 insertions(+), 1083 deletions(-) diff --git a/data/animals.json b/data/animals.json index 6b43102..20bd8a9 100644 --- a/data/animals.json +++ b/data/animals.json @@ -1,1071 +1,1019 @@ -{ - "A": [ - "Aardvark", - "Aardwolf", - "Abalone", - "Acaciarat", - "Acouchi", - "Addax", - "Adder", - "Adouri", - "Affenpinscher", - "Agama", - "Agouti", - "Aidi", - "Airedale", - "Akitainu", - "Albacore", - "Albatross", - "Albertosaurus", - "Alligator", - "Allosaurus", - "Alpaca", - "Ambushbug", - "Ammonite", - "Amoeba", - "Amphibian", - "Amphiuma", - "Amurminnow", - "Anaconda", - "Anchovy", - "Anemone", - "Angelfish", - "Anglerfish", - "Angora", - "Angwantibo", - "Anhinga", - "Ankole", - "Annelid", - "Annelida", - "Anole", - "Ant", - "Antbear", - "Anteater", - "Antelope", - "Antlion", - "Anura", - "Aoudad", - "Apatosaur", - "Ape", - "Aphid", - "Appaloosa", - "Aracari", - "Arachnid", - "Arawana", - "Archaeocete", - "Archaeopteryx", - "Archerfish", - "Argali", - "Armadillo", - "Arrowana", - "Aruanas", - "Asp", - "Ass", - "Assassinbug", - "Astarte", - "Auk", - "Auklet", - "Aurochs", - "Avocet", - "Axolotl", - "Aye-aye" - ], - "B": [ - "Babirusa", - "Baboon", - "Backswimmer", - "Bactrian", - "Badger", - "Bagworm", - "Baiji", - "Bandicoot", - "Banteng", - "Barasinga", - "Barasingha", - "Barb", - "Barbet", - "Barnacle", - "Barracuda", - "Basenji", - "Basil", - "Basilisk", - "Bass", - "Bat", - "Bats", - "Beagle", - "Bear", - "Beauceron", - "Beaver", - "Bedbug", - "Bee", - "Beetle", - "Betta", - "Bettong", - "Bilby", - "Binturong", - "Bird", - "Bison", - "Bittern", - "Blackbird", - "Blesbok", - "Blobfish", - "Blowfish", - "Bluebird", - "Bluebottle", - "Bluegill", - "Bluejay", - "Bluet", - "Boa", - "Boar", - "Bobcat", - "Bobolink", - "Bobwhite", - "Bongo", - "Bonobo", - "Booby", - "Borer", - "Borzoi", - "Boto", - "Boubou", - "Boutu", - "Bovine", - "Brant", - "Bream", - "Bronco", - "Brontosaurus", - "Bubblefish", - "Buck", - "Budgie", - "Bufeo", - "Buffalo", - "Bufflehead", - "Bug", - "Bull", - "Bumblebee", - "Bunny", - "Bunting", - "Burro", - "Bushbaby", - "Bushsqueaker", - "Bustard", - "Butterfly", - "Buzzard" - ], - "C": [ - "Caecilian", - "Caiman", - "Calf", - "Camel", - "Canary", - "Canine", - "Canvasback", - "Capybara", - "Caracal", - "Cardinal", - "Caribou", - "Carp", - "Cassowary", - "Cat", - "Caterpillar", - "Catfish", - "Cats", - "Cattle", - "Caudata", - "Cavy", - "Centipede", - "Cero", - "Chafer", - "Chameleon", - "Chamois", - "Chanticleer", - "Cheetah", - "Chevrotain", - "Chick", - "Chickadee", - "Chicken", - "Chihuahua", - "Chimpanzee", - "Chinchilla", - "Chipmunk", - "Chital", - "Chrysalis", - "Chrysomelid", - "Chuckwalla", - "Chupacabra", - "Cicada", - "Cirriped", - "Civet", - "Clam", - "Clingfish", - "Clumber", - "Coati", - "Cob", - "Cobra", - "Cock", - "Cockatiel", - "Cockatoo", - "Cockerspaniel", - "Cockroach", - "Cod", - "Coelacanth", - "Collie", - "Colt", - "Comet", - "Conch", - "Condor", - "Coney", - "Conure", - "Cony", - "Coot", - "Cooter", - "Copepod", - "Copperhead", - "Coqui", - "Coral", - "Cormorant", - "Cottonmouth", - "Cottontail", - "Cougar", - "Cow", - "Cowbird", - "Cowrie", - "Coyote", - "Coypu", - "Crab", - "Crane", - "Cranefly", - "Crayfish", - "Creature", - "Cricket", - "Crocodile", - "Crossbill", - "Crow", - "Cub", - "Cuckoo", - "Cur", - "Curassow", - "Curlew", - "Cuscus", - "Cusimanse", - "Cuttlefish", - "Cutworm", - "Cygnet" - ], - "D": [ - "Dachshund", - "Dairycow", - "Dalmatian", - "Damselfly", - "Dassie", - "Deer", - "Degu", - "Deinonychus", - "Devilfish", - "Dik-dik", - "Dikkop", - "Dingo", - "Dinosaur", - "Diplodocus", - "Dipper", - "Discus", - "Doctorfish", - "Dodo", - "Doe", - "Dog", - "Dogfish", - "Dolphin", - "Donkey", - "Dorado", - "Dore", - "Dorking", - "Dormouse", - "Dotterel", - "Dove", - "Dowitcher", - "Dragon", - "Dragonfly", - "Drake", - "Drever", - "Dromaeosaur", - "Dromedary", - "Drongo", - "Duck", - "Duckling", - "Dugong", - "Duiker", - "Dunlin", - "Dunnart" - ], - "E": [ - "Eagle", - "Earthworm", - "Earwig", - "Echidna", - "Eel", - "Eeve", - "Eft", - "Egg", - "Egret", - "Eider", - "Ekaltadeta", - "Eland", - "Elephant", - "Elk", - "Elkhound", - "Elver", - "Emu", - "Equestrian", - "Equine", - "Erin", - "Ermine", - "Erne", - "Eskimodog", - "Esok", - "Ewe", - "Eyas", - "Eyra" - ], - "F": [ - "Falcon", - "Fantail", - "Fawn", - "Feline", - "Ferret", - "Finch", - "Firefly", - "Fish", - "Flamingo", - "Flatfish", - "Flea", - "Flicker", - "Flounder", - "Fluke", - "Fly", - "Flycatcher", - "Foal", - "Fossa", - "Fowl", - "Fox", - "Foxhound", - "Frog", - "Frogmouth", - "Fugu", - "Fulmar", - "Furseal" - ], - "G": [ - "Gadwall", - "Galago", - "Galah", - "Gallinule", - "Gander", - "Gannet", - "Gar", - "Gaur", - "Gavial", - "Gazelle", - "Gecko", - "Geese", - "Gelada", - "Gelding", - "Gemsbok", - "Gemsbuck", - "Genet", - "Gerbil", - "Gerenuk", - "Gharial", - "Gibbon", - "Gilamonster", - "Giraffe", - "Glassfrog", - "Globefish", - "Glowworm", - "Gnat", - "Gnatcatcher", - "Gnu", - "Goa", - "Goat", - "Godwit", - "Goldeneye", - "Goldfinch", - "Goldfish", - "Gonolek", - "Goose", - "Goosefish", - "Gopher", - "Goral", - "Gorilla", - "Goshawk", - "Gosling", - "Gourami", - "Grackle", - "Grasshopper", - "Grayling", - "Grebe", - "Grison", - "Grosbeak", - "Groundhog", - "Grouper", - "Grouse", - "Grub", - "Grunion", - "Guanaco", - "Guillemot", - "Gull", - "Guppy", - "Gyrfalcon" - ], - "H": [ - "Hackee", - "Haddock", - "Hadrosaurus", - "Hagfish", - "Hairstreak", - "Hake", - "Halcyon", - "Halibut", - "Halicore", - "Hamadryad", - "Hamster", - "Hapuku", - "Hare", - "Harrier", - "Hart", - "Hartebeest", - "Harvestmen", - "Hatchetfish", - "Hawk", - "Hedgehog", - "Heifer", - "Hellbender", - "Hen", - "Herald", - "Heron", - "Herring", - "Heterodontosaurus", - "Hind", - "Hippopotamus", - "Hoatzin", - "Hog", - "Hogget", - "Hoiho", - "Hoki", - "Homalocephale", - "Honeybee", - "Hoopoe", - "Hornbill", - "Hornet", - "Horse", - "Horsefly", - "Hound", - "Housefly", - "Hoverfly", - "Huemul", - "Huia", - "Human", - "Hummingbird", - "Husky", - "Hydra", - "Hyena", - "Hylaeosaurus", - "Hypacrosaurus", - "Hypsilophodon", - "Hyracotherium", - "Hyrax" - ], - "I": [ - "Ibex", - "Ibis", - "Icefish", - "Ichthyosaurs", - "Ichthyostega", - "Iguana", - "Iguanodon", - "Illadopsis", - "Imago", - "Impala", - "Inchworm", - "Indri" - ], - "J": [ - "Jabiru", - "Jackal", - "Jackrabbit", - "Jaeger", - "Jaguar", - "Jaguarundi", - "Janenschia", - "Javalina", - "Jay", - "Jellyfish", - "Jenny", - "Jerboa", - "Joey", - "Junco", - "Junebug" - ], - "K": [ - "Kagu", - "Kakapo", - "Kakariki", - "Kangaroo", - "Karakul", - "Katydid", - "Kawala", - "Kentrosaurus", - "Kestrel", - "Kid", - "Killdeer", - "Killifish", - "Kingbird", - "Kingfisher", - "Kinglet", - "Kinkajou", - "Kiskadee", - "Kite", - "Kitten", - "Kittiwake", - "Kiwi", - "Koala", - "Kob", - "Koi", - "Kookaburra", - "Kouprey", - "Krill", - "Kronosaurus", - "Kudu", - "Kusimanse" - ], - "L": [ - "Lacewing", - "Ladybird", - "Ladybug", - "Lamb", - "Lamprey", - "Langur", - "Lark", - "Larva", - "Leafbird", - "Leafhopper", - "Leafwing", - "Leech", - "Lemming", - "Lemur", - "Leonberger", - "Leopard", - "Leveret", - "Liger", - "Limpet", - "Limpkin", - "Ling", - "Lion", - "Lionfish", - "Lizard", - "Llama", - "Lobo", - "Lobster", - "Locust", - "Longhorn", - "Longspur", - "Loon", - "Lorikeet", - "Loris", - "Louse", - "Lovebird", - "Lowchen", - "Lunamoth", - "Lungfish", - "Lynx" - ], - "M": [ - "Macaque", - "Macaw", - "Macropod", - "Maggot", - "Magpie", - "Maiasaura", - "Majungasaurus", - "Malamute", - "Mallard", - "Mamba", - "Mamenchisaurus", - "Mammoth", - "Manatee", - "Mandrill", - "Mangabey", - "Manta", - "Mantis", - "Mara", - "Marabou", - "Mare", - "Marlin", - "Marmoset", - "Marmot", - "Marten", - "Massasauga", - "Massospondylus", - "Mastiff", - "Mastodon", - "Mayfly", - "Mealworm", - "Meerkat", - "Megalosaurus", - "Megaraptor", - "Merganser", - "Merlin", - "Microvenator", - "Midge", - "Millipede", - "Mink", - "Minnow", - "Mite", - "Moa", - "Mockingbird", - "Mole", - "Molly", - "Mongoose", - "Mongrel", - "Monkey", - "Monkfish", - "Monoclonius", - "Montanoceratops", - "Moorhen", - "Moose", - "Moray", - "Morpho", - "Mosasaur", - "Mosquito", - "Moth", - "Motmot", - "Mouflon", - "Mouse", - "Mudpuppy", - "Mule", - "Mullet", - "Muntjac", - "Murrelet", - "Muskox", - "Muskrat", - "Mussaurus", - "Mussel", - "Mustang", - "Mutt", - "Myna", - "Myotis" - ], - "N": [ - "Nabarlek", - "Nag", - "Naga", - "Narwhal", - "Nauplius", - "Nautilus", - "Needlefish", - "Needletail", - "Nematode", - "Nene", - "Nerka", - "Nettlefish", - "Newt", - "Nightcrawler", - "Nighthawk", - "Nightingale", - "Nightjar", - "Nilgai", - "Noctule", - "Noddy", - "Noolbenger", - "Nudibranch", - "Numbat", - "Nuthatch", - "Nutria", - "Nyala", - "Nymph" - ], - "O": [ - "Ocelot", - "Octopus", - "Okapi", - "Olingo", - "Olm", - "Opossum", - "Orangutan", - "Orca", - "Oriole", - "Oropendola", - "Oryx", - "Osprey", - "Ostracod", - "Ostrich", - "Otter", - "Ovenbird", - "Owl", - "Ox", - "Oxpecker", - "Oyster" - ], - "P": [ - "Paca", - "Paddlefish", - "Panda", - "Pangolin", - "Panther", - "Papillon", - "Parakeet", - "Parrot", - "Partridge", - "Peacock", - "Peafowl", - "Peccary", - "Pekingese", - "Pelican", - "Penguin", - "Perch", - "Pewee", - "Phalarope", - "Pheasant", - "Phoebe", - "Phoenix", - "Pig", - "Pigeon", - "Piglet", - "Pika", - "Pike", - "Pilchard", - "Pinniped", - "Pintail", - "Pipistrelle", - "Pipit", - "Piranha", - "Pitbull", - "Pittabird", - "Plankton", - "Planthopper", - "Platypus", - "Plover", - "Polecat", - "Polliwog", - "Polyp", - "Polyturator", - "Pomeranian", - "Pondskater", - "Pony", - "Poodle", - "Porcupine", - "Porpoise", - "Possum", - "Prawn", - "Primate", - "Pronghorn", - "Ptarmigan", - "Pterodactyl", - "Pterosaur", - "Pufferfish", - "Puffin", - "Pug", - "Pullet", - "Puma", - "Pupfish", - "Puppy", - "Python" - ], - "Q": [ - "Quagga", - "Quahog", - "Quail", - "Quelea", - "Quetzal", - "Quetzalcoatlus", - "Quillback", - "Quokka", - "Quoll" - ], - "R": [ - "Rabbit", - "Raccoon", - "Racer", - "Racerunner", - "Ragfish", - "Rail", - "Rainbowfish", - "Ram", - "Raptor", - "Rasbora", - "Rat", - "Ratfish", - "Rattlesnake", - "Raven", - "Ray", - "Reindeer", - "Rhea", - "Rhinoceros", - "Ringworm", - "Roach", - "Roadrunner", - "Roan", - "Robin", - "Roebuck", - "Roller", - "Rook", - "Rooster", - "Rottweiler" - ], - "S": [ - "Sable", - "Sablefish", - "Saiga", - "Salamander", - "Salmon", - "Sambar", - "Sanderling", - "Sandpiper", - "Sapsucker", - "Sardine", - "Sawfish", - "Scallop", - "Scarab", - "Scaup", - "Schapendoes", - "Schipperke", - "Schnauzer", - "Scorpion", - "Scoter", - "Screamer", - "Seabird", - "Seagull", - "Seahorse", - "Seal", - "Seriema", - "Serpent", - "Serval", - "Shark", - "Sheep", - "Shelduck", - "Shoveler", - "Shrew", - "Shrike", - "Shrimp", - "Siamang", - "Sidewinder", - "Sifaka", - "Silverfish", - "Siskin", - "Skimmer", - "Skink", - "Skipper", - "Skua", - "Skunk", - "Skylark", - "Sloth", - "Slug", - "Smelt", - "Smew", - "Snail", - "Snake", - "Snipe", - "Solenodon", - "Sora", - "Spadefoot", - "Sparrow", - "Sphinx", - "Spider", - "Spittlebug", - "Sponge", - "Springbok", - "Springtail", - "Squab", - "Squamata", - "Squeaker", - "Squid", - "Squirrel", - "Stallion", - "Starfish", - "Starling", - "Steed", - "Steer", - "Stegosaurus", - "Stickleback", - "Stilt", - "Stinkbug", - "Stoat", - "Stonefly", - "Stork", - "Stud", - "Sturgeon", - "Sunbittern", - "Sunfish", - "Swallow", - "Swan", - "Swellfish", - "Swift", - "Swordfish" - ], - "T": [ - "Tadpole", - "Tahr", - "Takin", - "Tamarin", - "Tanager", - "Tapaculo", - "Tapir", - "Tarantula", - "Tarpan", - "Tarsier", - "Taruca", - "Tattler", - "Tayra", - "Teal", - "Tegus", - "Teledu", - "Tench", - "Tenrec", - "Termite", - "Tern", - "Terrapin", - "Terrier", - "Thrasher", - "Thrip", - "Thrush", - "Thunderbird", - "Thylacine", - "Tick", - "Tiger", - "Tilefish", - "Tinamou", - "Titi", - "Titmouse", - "Toad", - "Toadfish", - "Tomtit", - "Topi", - "Tortoise", - "Toucan", - "Towhee", - "Tragopan", - "Treecreeper", - "Trex", - "Triceratops", - "Trogon", - "Trout", - "Tuatara", - "Tuna", - "Turaco", - "Turkey", - "Turnstone", - "Turtle" - ], - "U": [ - "Uakari", - "Umbrette", - "Unau", - "Ungulate", - "Unicorn", - "Upupa", - "Urchin", - "Urial", - "Urson", - "Urubu", - "Urus", - "Urutu", - "Urva" - ], - "V": [ - "Vaquita", - "Veery", - "Velociraptor", - "Verdin", - "Vervet", - "Vicuna", - "Viper", - "Viperfish", - "Vireo", - "Vole", - "Volvox", - "Vulture" - ], - "W": [ - "Wallaby", - "Wallaroo", - "Walleye", - "Walrus", - "Warbler", - "Warthog", - "Wasp", - "Wattlebird", - "Watussi", - "Waxwing", - "Weasel", - "Weevil", - "Whale", - "Whapuku", - "Whelp", - "Whimbrel", - "Whippet", - "Whip-poor-will", - "Whooper", - "Wigeon", - "Wildebeest", - "Willet", - "Wisent", - "Wolf", - "Wolverine", - "Wombat", - "Woodborer", - "Woodchuck", - "Woodcock", - "Woodpecker", - "Worm", - "Wrasse", - "Wreckfish", - "Wren", - "Wrenchbird", - "Wryneck", - "Wuerhosaurus", - "Wyvern" - ], - "X": [ - "Xanclomys", - "Xantus", - "Xeme", - "Xenarthra", - "Xenoposeidon", - "Xenops", - "Xenopus", - "Xenotarsosaurus", - "Xenurine", - "Xerus", - "Xiaosaurus", - "Xiphias", - "Xiphosuran", - "Xoloitzcuintli", - "Xoni", - "Xuanhanosaurus", - "Xuanhuaceratops", - "Xuanhuasaurus" - ], - "Y": [ - "Yaffle", - "Yak", - "Yapok", - "Yardant", - "Yearling", - "Yellowhammer", - "Yellowjacket", - "Yellowlegs", - "Yellowthroat", - "Yeti", - "Ynambu", - "Yucker" - ], - "Z": [ - "Zander", - "Zebra", - "Zebrafish", - "Zebu", - "Zenaida", - "Zeren", - "Zooplankton", - "Zopilote", - "Zorilla" - ] -} +[ + "Aardvark", + "Aardwolf", + "Abalone", + "Acaciarat", + "Acouchi", + "Addax", + "Adder", + "Adouri", + "Affenpinscher", + "Agama", + "Agouti", + "Aidi", + "Airedale", + "Akitainu", + "Albacore", + "Albatross", + "Albertosaurus", + "Alligator", + "Allosaurus", + "Alpaca", + "Ambushbug", + "Ammonite", + "Amoeba", + "Amphibian", + "Amphiuma", + "Amurminnow", + "Anaconda", + "Anchovy", + "Anemone", + "Angelfish", + "Anglerfish", + "Angora", + "Angwantibo", + "Anhinga", + "Ankole", + "Annelid", + "Annelida", + "Anole", + "Ant", + "Antbear", + "Anteater", + "Antelope", + "Antlion", + "Anura", + "Aoudad", + "Apatosaur", + "Ape", + "Aphid", + "Appaloosa", + "Aracari", + "Arachnid", + "Arawana", + "Archaeocete", + "Archaeopteryx", + "Archerfish", + "Argali", + "Armadillo", + "Arrowana", + "Aruanas", + "Asp", + "Ass", + "Assassinbug", + "Astarte", + "Auk", + "Auklet", + "Aurochs", + "Avocet", + "Axolotl", + "Aye-aye", + "Babirusa", + "Baboon", + "Backswimmer", + "Bactrian", + "Badger", + "Bagworm", + "Baiji", + "Bandicoot", + "Banteng", + "Barasinga", + "Barasingha", + "Barb", + "Barbet", + "Barnacle", + "Barracuda", + "Basenji", + "Basil", + "Basilisk", + "Bass", + "Bat", + "Bats", + "Beagle", + "Bear", + "Beauceron", + "Beaver", + "Bedbug", + "Bee", + "Beetle", + "Betta", + "Bettong", + "Bilby", + "Binturong", + "Bird", + "Bison", + "Bittern", + "Blackbird", + "Blesbok", + "Blobfish", + "Blowfish", + "Bluebird", + "Bluebottle", + "Bluegill", + "Bluejay", + "Bluet", + "Boa", + "Boar", + "Bobcat", + "Bobolink", + "Bobwhite", + "Bongo", + "Bonobo", + "Booby", + "Borer", + "Borzoi", + "Boto", + "Boubou", + "Boutu", + "Bovine", + "Brant", + "Bream", + "Bronco", + "Brontosaurus", + "Bubblefish", + "Buck", + "Budgie", + "Bufeo", + "Buffalo", + "Bufflehead", + "Bug", + "Bull", + "Bumblebee", + "Bunny", + "Bunting", + "Burro", + "Bushbaby", + "Bushsqueaker", + "Bustard", + "Butterfly", + "Buzzard", + "Caecilian", + "Caiman", + "Calf", + "Camel", + "Canary", + "Canine", + "Canvasback", + "Capybara", + "Caracal", + "Cardinal", + "Caribou", + "Carp", + "Cassowary", + "Cat", + "Caterpillar", + "Catfish", + "Cats", + "Cattle", + "Caudata", + "Cavy", + "Centipede", + "Cero", + "Chafer", + "Chameleon", + "Chamois", + "Chanticleer", + "Cheetah", + "Chevrotain", + "Chick", + "Chickadee", + "Chicken", + "Chihuahua", + "Chimpanzee", + "Chinchilla", + "Chipmunk", + "Chital", + "Chrysalis", + "Chrysomelid", + "Chuckwalla", + "Chupacabra", + "Cicada", + "Cirriped", + "Civet", + "Clam", + "Clingfish", + "Clumber", + "Coati", + "Cob", + "Cobra", + "Cock", + "Cockatiel", + "Cockatoo", + "Cockerspaniel", + "Cockroach", + "Cod", + "Coelacanth", + "Collie", + "Colt", + "Comet", + "Conch", + "Condor", + "Coney", + "Conure", + "Cony", + "Coot", + "Cooter", + "Copepod", + "Copperhead", + "Coqui", + "Coral", + "Cormorant", + "Cottonmouth", + "Cottontail", + "Cougar", + "Cow", + "Cowbird", + "Cowrie", + "Coyote", + "Coypu", + "Crab", + "Crane", + "Cranefly", + "Crayfish", + "Creature", + "Cricket", + "Crocodile", + "Crossbill", + "Crow", + "Cub", + "Cuckoo", + "Cur", + "Curassow", + "Curlew", + "Cuscus", + "Cusimanse", + "Cuttlefish", + "Cutworm", + "Cygnet", + "Dachshund", + "Dairycow", + "Dalmatian", + "Damselfly", + "Dassie", + "Deer", + "Degu", + "Deinonychus", + "Devilfish", + "Dik-dik", + "Dikkop", + "Dingo", + "Dinosaur", + "Diplodocus", + "Dipper", + "Discus", + "Doctorfish", + "Dodo", + "Doe", + "Dog", + "Dogfish", + "Dolphin", + "Donkey", + "Dorado", + "Dore", + "Dorking", + "Dormouse", + "Dotterel", + "Dove", + "Dowitcher", + "Dragon", + "Dragonfly", + "Drake", + "Drever", + "Dromaeosaur", + "Dromedary", + "Drongo", + "Duck", + "Duckling", + "Dugong", + "Duiker", + "Dunlin", + "Dunnart", + "Eagle", + "Earthworm", + "Earwig", + "Echidna", + "Eel", + "Eeve", + "Eft", + "Egg", + "Egret", + "Eider", + "Ekaltadeta", + "Eland", + "Elephant", + "Elk", + "Elkhound", + "Elver", + "Emu", + "Equestrian", + "Equine", + "Erin", + "Ermine", + "Erne", + "Eskimodog", + "Esok", + "Ewe", + "Eyas", + "Eyra", + "Falcon", + "Fantail", + "Fawn", + "Feline", + "Ferret", + "Finch", + "Firefly", + "Fish", + "Flamingo", + "Flatfish", + "Flea", + "Flicker", + "Flounder", + "Fluke", + "Fly", + "Flycatcher", + "Foal", + "Fossa", + "Fowl", + "Fox", + "Foxhound", + "Frog", + "Frogmouth", + "Fugu", + "Fulmar", + "Furseal", + "Gadwall", + "Galago", + "Galah", + "Gallinule", + "Gander", + "Gannet", + "Gar", + "Gaur", + "Gavial", + "Gazelle", + "Gecko", + "Geese", + "Gelada", + "Gelding", + "Gemsbok", + "Gemsbuck", + "Genet", + "Gerbil", + "Gerenuk", + "Gharial", + "Gibbon", + "Gilamonster", + "Giraffe", + "Glassfrog", + "Globefish", + "Glowworm", + "Gnat", + "Gnatcatcher", + "Gnu", + "Goa", + "Goat", + "Godwit", + "Goldeneye", + "Goldfinch", + "Goldfish", + "Gonolek", + "Goose", + "Goosefish", + "Gopher", + "Goral", + "Gorilla", + "Goshawk", + "Gosling", + "Gourami", + "Grackle", + "Grasshopper", + "Grayling", + "Grebe", + "Grison", + "Grosbeak", + "Groundhog", + "Grouper", + "Grouse", + "Grub", + "Grunion", + "Guanaco", + "Guillemot", + "Gull", + "Guppy", + "Gyrfalcon", + "Hackee", + "Haddock", + "Hadrosaurus", + "Hagfish", + "Hairstreak", + "Hake", + "Halcyon", + "Halibut", + "Halicore", + "Hamadryad", + "Hamster", + "Hapuku", + "Hare", + "Harrier", + "Hart", + "Hartebeest", + "Harvestmen", + "Hatchetfish", + "Hawk", + "Hedgehog", + "Heifer", + "Hellbender", + "Hen", + "Herald", + "Heron", + "Herring", + "Heterodontosaurus", + "Hind", + "Hippopotamus", + "Hoatzin", + "Hog", + "Hogget", + "Hoiho", + "Hoki", + "Homalocephale", + "Honeybee", + "Hoopoe", + "Hornbill", + "Hornet", + "Horse", + "Horsefly", + "Hound", + "Housefly", + "Hoverfly", + "Huemul", + "Huia", + "Human", + "Hummingbird", + "Husky", + "Hydra", + "Hyena", + "Hylaeosaurus", + "Hypacrosaurus", + "Hypsilophodon", + "Hyracotherium", + "Hyrax", + "Ibex", + "Ibis", + "Icefish", + "Ichthyosaurs", + "Ichthyostega", + "Iguana", + "Iguanodon", + "Illadopsis", + "Imago", + "Impala", + "Inchworm", + "Indri", + "Jabiru", + "Jackal", + "Jackrabbit", + "Jaeger", + "Jaguar", + "Jaguarundi", + "Janenschia", + "Javalina", + "Jay", + "Jellyfish", + "Jenny", + "Jerboa", + "Joey", + "Junco", + "Junebug", + "Kagu", + "Kakapo", + "Kakariki", + "Kangaroo", + "Karakul", + "Katydid", + "Kawala", + "Kentrosaurus", + "Kestrel", + "Kid", + "Killdeer", + "Killifish", + "Kingbird", + "Kingfisher", + "Kinglet", + "Kinkajou", + "Kiskadee", + "Kite", + "Kitten", + "Kittiwake", + "Kiwi", + "Koala", + "Kob", + "Koi", + "Kookaburra", + "Kouprey", + "Krill", + "Kronosaurus", + "Kudu", + "Kusimanse", + "Lacewing", + "Ladybird", + "Ladybug", + "Lamb", + "Lamprey", + "Langur", + "Lark", + "Larva", + "Leafbird", + "Leafhopper", + "Leafwing", + "Leech", + "Lemming", + "Lemur", + "Leonberger", + "Leopard", + "Leveret", + "Liger", + "Limpet", + "Limpkin", + "Ling", + "Lion", + "Lionfish", + "Lizard", + "Llama", + "Lobo", + "Lobster", + "Locust", + "Longhorn", + "Longspur", + "Loon", + "Lorikeet", + "Loris", + "Louse", + "Lovebird", + "Lowchen", + "Lunamoth", + "Lungfish", + "Lynx", + "Macaque", + "Macaw", + "Macropod", + "Maggot", + "Magpie", + "Maiasaura", + "Majungasaurus", + "Malamute", + "Mallard", + "Mamba", + "Mamenchisaurus", + "Mammoth", + "Manatee", + "Mandrill", + "Mangabey", + "Manta", + "Mantis", + "Mara", + "Marabou", + "Mare", + "Marlin", + "Marmoset", + "Marmot", + "Marten", + "Massasauga", + "Massospondylus", + "Mastiff", + "Mastodon", + "Mayfly", + "Mealworm", + "Meerkat", + "Megalosaurus", + "Megaraptor", + "Merganser", + "Merlin", + "Microvenator", + "Midge", + "Millipede", + "Mink", + "Minnow", + "Mite", + "Moa", + "Mockingbird", + "Mole", + "Molly", + "Mongoose", + "Mongrel", + "Monkey", + "Monkfish", + "Monoclonius", + "Montanoceratops", + "Moorhen", + "Moose", + "Moray", + "Morpho", + "Mosasaur", + "Mosquito", + "Moth", + "Motmot", + "Mouflon", + "Mouse", + "Mudpuppy", + "Mule", + "Mullet", + "Muntjac", + "Murrelet", + "Muskox", + "Muskrat", + "Mussaurus", + "Mussel", + "Mustang", + "Mutt", + "Myna", + "Myotis", + "Nabarlek", + "Nag", + "Naga", + "Narwhal", + "Nauplius", + "Nautilus", + "Needlefish", + "Needletail", + "Nematode", + "Nene", + "Nerka", + "Nettlefish", + "Newt", + "Nightcrawler", + "Nighthawk", + "Nightingale", + "Nightjar", + "Nilgai", + "Noctule", + "Noddy", + "Noolbenger", + "Nudibranch", + "Numbat", + "Nuthatch", + "Nutria", + "Nyala", + "Nymph", + "Ocelot", + "Octopus", + "Okapi", + "Olingo", + "Olm", + "Opossum", + "Orangutan", + "Orca", + "Oriole", + "Oropendola", + "Oryx", + "Osprey", + "Ostracod", + "Ostrich", + "Otter", + "Ovenbird", + "Owl", + "Ox", + "Oxpecker", + "Oyster", + "Paca", + "Paddlefish", + "Panda", + "Pangolin", + "Panther", + "Papillon", + "Parakeet", + "Parrot", + "Partridge", + "Peacock", + "Peafowl", + "Peccary", + "Pekingese", + "Pelican", + "Penguin", + "Perch", + "Pewee", + "Phalarope", + "Pheasant", + "Phoebe", + "Phoenix", + "Pig", + "Pigeon", + "Piglet", + "Pika", + "Pike", + "Pilchard", + "Pinniped", + "Pintail", + "Pipistrelle", + "Pipit", + "Piranha", + "Pitbull", + "Pittabird", + "Plankton", + "Planthopper", + "Platypus", + "Plover", + "Polecat", + "Polliwog", + "Polyp", + "Polyturator", + "Pomeranian", + "Pondskater", + "Pony", + "Poodle", + "Porcupine", + "Porpoise", + "Possum", + "Prawn", + "Primate", + "Pronghorn", + "Ptarmigan", + "Pterodactyl", + "Pterosaur", + "Pufferfish", + "Puffin", + "Pug", + "Pullet", + "Puma", + "Pupfish", + "Puppy", + "Python", + "Quagga", + "Quahog", + "Quail", + "Quelea", + "Quetzal", + "Quetzalcoatlus", + "Quillback", + "Quokka", + "Quoll", + "Rabbit", + "Raccoon", + "Racer", + "Racerunner", + "Ragfish", + "Rail", + "Rainbowfish", + "Ram", + "Raptor", + "Rasbora", + "Rat", + "Ratfish", + "Rattlesnake", + "Raven", + "Ray", + "Reindeer", + "Rhea", + "Rhinoceros", + "Ringworm", + "Roach", + "Roadrunner", + "Roan", + "Robin", + "Roebuck", + "Roller", + "Rook", + "Rooster", + "Rottweiler", + "Sable", + "Sablefish", + "Saiga", + "Salamander", + "Salmon", + "Sambar", + "Sanderling", + "Sandpiper", + "Sapsucker", + "Sardine", + "Sawfish", + "Scallop", + "Scarab", + "Scaup", + "Schapendoes", + "Schipperke", + "Schnauzer", + "Scorpion", + "Scoter", + "Screamer", + "Seabird", + "Seagull", + "Seahorse", + "Seal", + "Seriema", + "Serpent", + "Serval", + "Shark", + "Sheep", + "Shelduck", + "Shoveler", + "Shrew", + "Shrike", + "Shrimp", + "Siamang", + "Sidewinder", + "Sifaka", + "Silverfish", + "Siskin", + "Skimmer", + "Skink", + "Skipper", + "Skua", + "Skunk", + "Skylark", + "Sloth", + "Slug", + "Smelt", + "Smew", + "Snail", + "Snake", + "Snipe", + "Solenodon", + "Sora", + "Spadefoot", + "Sparrow", + "Sphinx", + "Spider", + "Spittlebug", + "Sponge", + "Springbok", + "Springtail", + "Squab", + "Squamata", + "Squeaker", + "Squid", + "Squirrel", + "Stallion", + "Starfish", + "Starling", + "Steed", + "Steer", + "Stegosaurus", + "Stickleback", + "Stilt", + "Stinkbug", + "Stoat", + "Stonefly", + "Stork", + "Stud", + "Sturgeon", + "Sunbittern", + "Sunfish", + "Swallow", + "Swan", + "Swellfish", + "Swift", + "Swordfish", + "Tadpole", + "Tahr", + "Takin", + "Tamarin", + "Tanager", + "Tapaculo", + "Tapir", + "Tarantula", + "Tarpan", + "Tarsier", + "Taruca", + "Tattler", + "Tayra", + "Teal", + "Tegus", + "Teledu", + "Tench", + "Tenrec", + "Termite", + "Tern", + "Terrapin", + "Terrier", + "Thrasher", + "Thrip", + "Thrush", + "Thunderbird", + "Thylacine", + "Tick", + "Tiger", + "Tilefish", + "Tinamou", + "Titi", + "Titmouse", + "Toad", + "Toadfish", + "Tomtit", + "Topi", + "Tortoise", + "Toucan", + "Towhee", + "Tragopan", + "Treecreeper", + "Trex", + "Triceratops", + "Trogon", + "Trout", + "Tuatara", + "Tuna", + "Turaco", + "Turkey", + "Turnstone", + "Turtle", + "Uakari", + "Umbrette", + "Unau", + "Ungulate", + "Unicorn", + "Upupa", + "Urchin", + "Urial", + "Urson", + "Urubu", + "Urus", + "Urutu", + "Urva", + "Vaquita", + "Veery", + "Velociraptor", + "Verdin", + "Vervet", + "Vicuna", + "Viper", + "Viperfish", + "Vireo", + "Vole", + "Volvox", + "Vulture", + "Wallaby", + "Wallaroo", + "Walleye", + "Walrus", + "Warbler", + "Warthog", + "Wasp", + "Wattlebird", + "Watussi", + "Waxwing", + "Weasel", + "Weevil", + "Whale", + "Whapuku", + "Whelp", + "Whimbrel", + "Whippet", + "Whip-poor-will", + "Whooper", + "Wigeon", + "Wildebeest", + "Willet", + "Wisent", + "Wolf", + "Wolverine", + "Wombat", + "Woodborer", + "Woodchuck", + "Woodcock", + "Woodpecker", + "Worm", + "Wrasse", + "Wreckfish", + "Wren", + "Wrenchbird", + "Wryneck", + "Wuerhosaurus", + "Wyvern", + "Xanclomys", + "Xantus", + "Xeme", + "Xenarthra", + "Xenoposeidon", + "Xenops", + "Xenopus", + "Xenotarsosaurus", + "Xenurine", + "Xerus", + "Xiaosaurus", + "Xiphias", + "Xiphosuran", + "Xoloitzcuintli", + "Xoni", + "Xuanhanosaurus", + "Xuanhuaceratops", + "Xuanhuasaurus", + "Yaffle", + "Yak", + "Yapok", + "Yardant", + "Yearling", + "Yellowhammer", + "Yellowjacket", + "Yellowlegs", + "Yellowthroat", + "Yeti", + "Ynambu", + "Yucker", + "Zander", + "Zebra", + "Zebrafish", + "Zebu", + "Zenaida", + "Zeren", + "Zooplankton", + "Zopilote", + "Zorilla" +] diff --git a/mod.ts b/mod.ts index 05ef3df..adb99cd 100644 --- a/mod.ts +++ b/mod.ts @@ -1,7 +1,3 @@ -function getRandomWord(words: string[]) { - return words[Math.floor(Math.random() * words.length)]; -} - /** * Generates a randomized, two-word, alliterated animal name. * @@ -23,13 +19,10 @@ export async function generateRandomName(): Promise { import("./data/animals.json", { with: { type: "json" } }), ]); - const letters = Object.keys(animals); - const randomLetter = - letters[Math.floor(Math.random() * letters.length)] as keyof typeof animals; + const animal = animals[Math.floor(Math.random() * animals.length)]; + const letter = animal[0].toUpperCase() as keyof typeof adjectives; + const options = adjectives[letter]; + const adjective = options[Math.floor(Math.random() * options.length)]; - return `${getRandomWord(adjectives[randomLetter])} ${ - getRandomWord( - animals[randomLetter], - ) - }`; + return `${adjective} ${animal}`; } -- 2.51.2