hobby-by-category
Version:
A comprehensive, type-safe list of hobbies organized by categories.
158 lines (151 loc) • 5.01 kB
text/typescript
type Hobby = string;
interface HobbiesByCategory {
creativeAndArtistic: Hobby[];
outdoorAndAdventure: Hobby[];
sportsAndFitness: Hobby[];
intellectualAndLearning: Hobby[];
techAndGaming: Hobby[];
musicAndPerformance: Hobby[];
collecting: Hobby[];
foodAndDrink: Hobby[];
socialAndCommunity: Hobby[];
relaxationAndMindfulness: Hobby[];
}
const hobbiesByCategory: HobbiesByCategory = {
creativeAndArtistic: [
"Painting (acrylic, watercolor, oil)",
"Drawing (sketching, digital art, charcoal)",
"Calligraphy & Hand Lettering",
"Photography (nature, portrait, street, macro)",
"Pottery & Ceramics",
"Sculpting",
"Knitting & Crocheting",
"Sewing & Embroidery",
"DIY Crafts & Upcycling",
"Jewelry Making",
"Woodworking & Carpentry",
"Origami & Paper Crafts",
"Scrapbooking",
"Cosplay & Costume Design",
"Graphic Design",
"Writing (poetry, fiction, blogging)"
],
outdoorAndAdventure: [
"Hiking & Trekking",
"Camping & Backpacking",
"Rock Climbing",
"Kayaking & Canoeing",
"Surfing & Paddleboarding",
"Fishing",
"Gardening (urban, hydroponics, bonsai)",
"Bird Watching",
"Geocaching (treasure hunting with GPS)",
"Foraging (wild edibles)",
"Mountain Biking",
"Horseback Riding",
"Skiing & Snowboarding",
"Skydiving",
"Paragliding"
],
sportsAndFitness: [
"Running & Jogging",
"Yoga & Pilates",
"Martial Arts (karate, taekwondo, jiu-jitsu)",
"Weightlifting & Bodybuilding",
"Swimming",
"Dancing (salsa, ballet, hip-hop, ballroom)",
"Gymnastics",
"Parkour",
"Archery",
"Fencing",
"Team Sports (soccer, basketball, volleyball)",
"Tennis & Badminton",
"Golf",
"Cycling"
],
intellectualAndLearning: [
"Reading (fiction, non-fiction, classics)",
"Learning New Languages",
"Chess & Strategy Games",
"Puzzle Solving (crosswords, Sudoku, escape rooms)",
"Astronomy & Stargazing",
"Philosophy & Debate",
"History Research",
"Genealogy (family tree research)",
"Podcasting",
"Trivia & Quizzes"
],
techAndGaming: [
"Coding & Programming",
"Video Game Design",
"Gaming (PC, console, mobile, retro)",
"Virtual Reality (VR) Experiences",
"Robotics & Electronics (Arduino, Raspberry Pi)",
"3D Printing & Modeling",
"Drone Flying & Aerial Photography",
"Cybersecurity & Ethical Hacking"
],
musicAndPerformance: [
"Playing an Instrument (guitar, piano, violin, drums)",
"Singing & Voice Training",
"Music Production (DAWs, mixing, composing)",
"DJing",
"Beatboxing",
"Theater & Acting",
"Stand-up Comedy",
"Magic Tricks & Illusions"
],
collecting: [
"Coin & Stamp Collecting",
"Vinyl Records & CDs",
"Comic Books & Manga",
"Trading Cards (Pokémon, Magic: The Gathering)",
"Antiques & Vintage Items",
"Action Figures & Toys",
"Perfume or Candle Collecting",
"Book Collecting (rare editions)"
],
foodAndDrink: [
"Cooking & Baking",
"Homebrewing (beer, wine, mead)",
"Coffee & Tea Tasting",
"Mixology (cocktail making)",
"Chocolate Making",
"Food Fermentation (kombucha, kimchi, sourdough)",
"Gourmet Cheese Tasting"
],
socialAndCommunity: [
"Volunteering (animal shelters, NGOs)",
"Board Games & Tabletop RPGs (Dungeons & Dragons)",
"Book Clubs",
"Meetups & Networking Events",
"Travel & Cultural Exchange",
"Pet Training & Dog Sports"
],
relaxationAndMindfulness: [
"Meditation",
"Journaling",
"Aromatherapy & Candle Making",
"Feng Shui & Home Organization",
"Coloring Books (for adults)",
"Listening to Music or ASMR"
]
};
// Utility Functions
const getAllCategories = (): string[] => Object.keys(hobbiesByCategory);
const getHobbiesByCategory = (category: keyof HobbiesByCategory): Hobby[] =>
hobbiesByCategory[category] || [];
const getRandomHobby = (category?: keyof HobbiesByCategory): Hobby => {
const hobbies = category
? getHobbiesByCategory(category)
: Object.values(hobbiesByCategory).flat();
return hobbies[Math.floor(Math.random() * hobbies.length)];
};
// Export Setup
export default {
...hobbiesByCategory,
getAllCategories,
getHobbiesByCategory,
getRandomHobby
};
export type { HobbiesByCategory, Hobby };