npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hobby-by-category

v1.0.1

Published

A comprehensive, type-safe list of hobbies organized by categories.

Readme

hobby-by-category 🎨⚡🏕️

A comprehensive, type-safe list of hobbies organized by categories. Perfect for forms, recommendation systems, and hobby discovery apps.

Features

  • 300+ hobbies across 10 categories
  • TypeScript & JavaScript support
  • Ready for dropdowns/forms
  • Utility functions for easy access
  • Zero dependencies
  • Active maintenance

Installation

npm install hobby-by-category
# or
yarn add hobby-by-category

Basic Usage

JavaScript (CommonJS)

const hobbies = require('hobby-by-category');

// Access all creative hobbies
console.log(hobbies.creativeAndArtistic);

// Get random outdoor activity
const randomHobby = hobbies.getRandomHobby('outdoorAndAdventure');

TypeScript/ES Modules

import hobbies, { getHobbiesByCategory } from 'hobby-by-category';

// Get all photography-related hobbies
const photoHobbies = getHobbiesByCategory('creativeAndArtistic')
  .filter(h => h.includes('Photography'));

Available Categories

  1. creativeAndArtistic - Painting, Drawing, Photography, etc.
  2. outdoorAndAdventure - Hiking, Camping, Rock Climbing, etc.
  3. sportsAndFitness - Running, Yoga, Swimming, etc.
  4. intellectualAndLearning - Reading, Chess, Astronomy, etc.
  5. techAndGaming - Coding, Gaming, VR, etc.
  6. musicAndPerformance - Instruments, Singing, DJing, etc.
  7. collecting - Coins, Vinyl, Comics, etc.
  8. foodAndDrink - Cooking, Brewing, Mixology, etc.
  9. socialAndCommunity - Volunteering, Board Games, etc.
  10. relaxationAndMindfulness - Meditation, Journaling, etc.

API Reference

Default Export

The complete categorized hobbies object:

{
  creativeAndArtistic: string[],
  outdoorAndAdventure: string[],
  sportsAndFitness: string[];
  intellectualAndLearning: string[];
  techAndGaming: string[];
  musicAndPerformance: string[];
  collecting: string[];
  foodAndDrink: string[];
  socialAndCommunity: string[];
  relaxationAndMindfulness: string[];
}

Utility Functions

| Function | Description | Example | |----------|-------------|---------| | getAllCategories() | Returns all category names | ['creativeAndArtistic', ...] | | getHobbiesByCategory(category) | Returns hobbies for specific category | getHobbiesByCategory('techAndGaming') | | getRandomHobby(category?) | Returns random hobby (optionally filtered by category) | getRandomHobby('foodAndDrink') |

Example Implementations

React Form Component

import { useState } from 'react';
import hobbies from 'hobby-by-category';

function HobbyForm() {
  const [category, setCategory] = useState('');
  const [hobby, setHobby] = useState('');

  return (
    <form>
      <label>Category:
        <select value={category} onChange={e => setCategory(e.target.value)}>
          <option value="">Select a category</option>
          {hobbies.getAllCategories().map(cat => (
            <option key={cat} value={cat}>{cat}</option>
          ))}
        </select>
      </label>

      <label>Hobby:
        <select
          value={hobby}
          onChange={e => setHobby(e.target.value)}
          disabled={!category}
        >
          <option value="">Select a hobby</option>
          {category && hobbies.getHobbiesByCategory(category).map(h => (
            <option key={h} value={h}>{h}</option>
          ))}
        </select>
      </label>
    </form>
  );
}

Node.js Form Processing

const hobbies = require('hobby-by-category');

app.post('/profile', (req, res) => {
  const { category, hobby } = req.body;
 
  if (!hobbies.getHobbiesByCategory(category).includes(hobby)) {
    return res.status(400).send('Invalid hobby selection');
  }
 
  // Save valid hobby to profile
});

Development

Building from Source

git clone https://github.com/therealMAO247/hobby-by-category.git
cd hobby-by-category
npm install
npm run build

Testing

npm test

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a new branch for your feature
  3. Submit a pull request

License

MIT © 2025, Michael Anan Onimisi <@therealMAO247>. MIT © 2025, Ahoiza Techbologies <www.ahoizatechnologies.com>.