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

joyful

v1.2.0

Published

A list of friendly words to use in your app.

Readme

joyful

Generate friendly, safe-for-work word combinations for project names, usernames, labels, demo data, and unique-looking identifiers.

Quick Start

bun add joyful
import { joyful } from "joyful";

joyful(); // "amber-fox"
joyful({ segments: 3 }); // "golden-marble-cathedral"
joyful({ separator: "_" }); // "swift_otter"

You can also use the CLI:

joyful
joyful --segments 3
joyful --pattern color,nature,animal

Generate Names

By default, joyful() returns two lowercase words joined with -. The first word is a friendly prefix, either an adjective or a color. Later words come from the broader word lists.

import { joyful } from "joyful";

joyful(); // "bright-dolphin"
joyful({ segments: 4 }); // "kind-river-cello-baker"
joyful({ separator: "_" }); // "golden_panda"
joyful({ maxLength: 8 }); // "tan-elk"

maxLength filters word choices so the final string fits within the requested limit. If the limit is too short to produce a valid name, joyful() throws.

Pattern-Based Names

Use pattern when you want each word to come from a specific category.

joyful({ pattern: ["adjective", "animal"] }); // "happy-dolphin"
joyful({ pattern: ["color", "nature", "animal"] }); // "amber-river-otter"
joyful({ pattern: ["city", "nature", "space"] }); // "kyoto-river-orbit"

Pattern rules:

  • Category names are singular, such as animal, color, city, and nature.
  • The pattern length controls the number of words.
  • pattern takes precedence over segments.
  • separator and maxLength still apply to generated names.
  • Unknown categories throw an error with the supported category names.

CLI

The CLI supports the same core generation options:

joyful
joyful --segments 3
joyful --separator _
joyful --max-length 12
joyful --pattern adjective,animal
joyful --pattern city,nature,space --separator _

Short flags are available for common generation options:

joyful -s 3
joyful -p _
joyful -m 12
joyful -t color,nature,animal

Count Permutations

Use permutations() to count possible unbounded combinations without generating a name.

import { permutations } from "joyful";

permutations(); // 997425
permutations({ segments: 3 }); // 2917468125
permutations({ pattern: ["adjective", "animal"] }); // 46081
permutations({ pattern: ["color", "nature", "animal"] }); // 4674684

The CLI can print the same counts:

joyful --permutations
joyful --permutations --segments 3
joyful --permutations --pattern color,nature,animal

For automation, add --json:

joyful --permutations --pattern color,nature,animal --json
{
  "pattern": ["color", "nature", "animal"],
  "permutations": 4674684
}

Permutation counts do not account for maxLength, because bounded generation depends on word lengths and fitting constraints.

API

joyful(options?)

Returns a generated name as a string.

| Option | Type | Default | Description | | ----------- | ------------------ | ------- | ------------------------------------- | | segments | number | 2 | Number of words to generate | | pattern | JoyfulCategory[] | none | Category pattern for each word | | separator | string | "-" | Character(s) between words | | maxLength | number | none | Maximum length of the returned string |

permutations(options?)

Returns the number of possible unbounded combinations as a number.

| Option | Type | Default | Description | | ---------- | ------------------ | ------- | ------------------------------ | | segments | number | 2 | Number of words to count | | pattern | JoyfulCategory[] | none | Category pattern for each word |

JoyfulCategory

Supported pattern categories:

type JoyfulCategory =
  | "adjective"
  | "animal"
  | "architecture"
  | "art"
  | "city"
  | "color"
  | "emotion"
  | "fashion"
  | "food"
  | "history"
  | "literature"
  | "music"
  | "mythology"
  | "nature"
  | "profession"
  | "science"
  | "space"
  | "sport"
  | "transportation";

Word Lists

All words are lowercase, single-token, safe-for-work terms.

| Category | Words | | -------------- | ----- | | Adjectives | 227 | | Animals | 203 | | Architecture | 184 | | Art | 186 | | Cities | 73 | | Colors | 114 | | Emotions | 89 | | Fashion | 169 | | Food | 186 | | History | 131 | | Literature | 197 | | Music | 162 | | Mythology | 164 | | Nature | 202 | | Professions | 288 | | Science | 223 | | Space | 131 | | Sports | 154 | | Transportation | 183 |

Default Permutations

Default generation starts with an adjective or color, then draws each later word from the non-prefix lists.

| Segments | Combinations | | -------- | ---------------------- | | 2 | 997,425 | | 3 | 2,917,468,125 | | 4 | 8,533,594,265,625 | | 5 | 24,960,763,226,953,124 |

Errors And Constraints

  • segments must be at least 2.
  • separator cannot be an empty string.
  • maxLength must be a positive integer when provided.
  • Unknown pattern categories throw an error.
  • CLI --json is only supported with --permutations.
  • CLI --permutations does not support --max-length.

SFW Guarantee

All word lists are manually curated to be safe for work and family-friendly. Every category has been audited to exclude profanity, slurs, and negative or distressing terms. You can use joyful-generated names in any context without worry.

Benchmarks

Run bun run perf to generate the runtime, startup, package size, and consumer bundle size report. See BENCHMARKS.md for what the report measures and how to interpret it.

Credits

Originally created by Hayden Bleasel.

Based on friendly-words by Glitch, with curated word lists and additional categories.

License

ISC