pet-username-generator
Version:
Generate fun, pet-themed usernames with random adjectives, animal-related words, and numbers.
279 lines (273 loc) • 3.8 kB
JavaScript
// Word lists
const adjectives = [
"Happy",
"Fluffy",
"Clever",
"Playful",
"Sleepy",
"Brave",
"Loyal",
"Gentle",
"Fierce",
"Swift",
"Cuddly",
"Cheerful",
"Sunny",
"Charming",
"Zippy",
"Grumpy",
"Bouncy",
"Curious",
"Tiny",
"Mighty",
"Lazy",
"Bold",
"Fuzzy",
"Lovely",
"Sneaky",
"Proud",
"Goofy",
"Witty",
"Wild",
"Silly",
"Jolly",
"Lucky",
"Shiny",
"Funky",
"Bright",
"Nimble",
"Daring",
"Fearless",
"Sassy",
"Cool",
"Chirpy",
"Chill",
"Gleeful",
"Radiant",
"Dizzy",
"Hyper",
"Peppy",
"Calm",
"Frosty",
"Blissful",
"Giggly",
"Perky",
"Zesty",
"Whimsical",
"Nifty",
"Spunky",
"Rusty",
"Rowdy",
"Snappy",
];
const petWords = [
"Paw",
"Tail",
"Whisker",
"Fur",
"Claw",
"Nose",
"Ear",
"Snout",
"Hoof",
"Mane",
"Fang",
"Pelt",
"Trotter",
"Scales",
"Shell",
"Beak",
"Feather",
"Wing",
"Talon",
"Fin",
"Gill",
"Antler",
"Horn",
"Fluff",
"Stripe",
"Spot",
"Chirp",
"Song",
"Quill",
"Plumage",
"Peck",
"Glide",
"Tongue",
"Spike",
"Slither",
"Croak",
"Wave",
"Reef",
"Coral",
"Splash",
"Current",
"Wool",
"Moo",
"Baa",
"Gallop",
"Neigh",
"Nest",
"Saddle",
"Roar",
"Purr",
"Whinny",
"Snarl",
"Yap",
"Bark",
"Hoot",
"Howl",
"Buzz",
"Squeak",
"Chomp",
"Nibble",
"Hop",
"Burrow",
"Leap",
"Pounce",
"Scurry",
"Sniff",
"Wag",
"Cuddle",
"Meow",
"Chase",
"Hiss",
"Blink",
"Stomp",
"Trot",
"Crest",
"Swish",
"Trill",
"Lick",
"Scratch",
"Snuggle",
"Dive",
"Ripple",
"Surge",
"Twitch",
"Flutter",
"Plop",
];
const petNames = [
"Bella",
"Charlie",
"Luna",
"Max",
"Milo",
"Coco",
"Buddy",
"Rocky",
"Zoe",
"Oreo",
"Shadow",
"Simba",
"Nala",
"Leo",
"Daisy",
"Bailey",
"Rex",
"Peanut",
"Mochi",
"Kiki",
"Loki",
"Pumpkin",
"Maple",
"Ginger",
"Pepper",
"Bear",
"Chloe",
"Ruby",
"Jasper",
"Mango",
"Nova",
"Poppy",
"Mocha",
"Toby",
"Penny",
"Bingo",
"Sunny",
"Zara",
"Marley",
"Basil",
"Rosie",
"Ace",
"Snowy",
"Blue",
"Pickles",
"Cinnamon",
"Nugget",
"Holly",
"Honey",
"Socks",
"Bambi",
"Waffle",
"Cupcake",
"Brownie",
"Ollie",
"Finn",
"Rusty",
"Bandit",
"Zeus",
"Apollo",
"Misty",
"Trixie",
"Athena",
"Whiskey",
"Muffin",
"Piper",
"Lola",
"Sparky",
"Casper",
"Bentley",
"Chester",
"Fudge",
"Goose",
"Harley",
"Bubbles",
"Snickers",
"Toffee",
"Chai",
"Kiwi",
"Peppermint",
"Dusty",
"Mojo",
"Hazel",
"Scooter",
"Otis",
"Hershey",
"Nibbles",
"Marshmallow",
"Snowball",
"Comet",
"Indy",
"Sprinkles",
"Twix",
"Skittles",
"Rolo",
"Tango",
"Clover",
"Frodo",
"Bolt",
"Churro",
];
// Number suffix generator with variant padding
function generateNumberVariant() {
const num = Math.floor(Math.random() * 999) + 1; // 1-999
const variantType = Math.floor(Math.random() * 3);
if (variantType === 0) return String(num); // "7"
if (variantType === 1) return String(num).padStart(2, "0"); // "07"
return String(num).padStart(3, "0"); // "007"
}
/**
* Generates a pet-themed username.
* @param {string} [separator=""] - Optional separator between words (e.g., "_", "-", ".").
* @returns {string} The generated username.
*/
function generatePetUsername(separator = "") {
const adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
const petWord = petWords[Math.floor(Math.random() * petWords.length)];
const pet = petNames[Math.floor(Math.random() * petNames.length)];
const number = generateNumberVariant();
return [adjective, petWord, pet, number].join(separator);
}
module.exports = { generatePetUsername };