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

@catgirls/better-format

v1.0.0

Published

Make strings actually look good.

Readme

@catgirls/better-format ✨

Nyaa~! Let's make strings that don't look like garbage! ฅ^•ﻌ•^ฅ

NOTE: Currently in alphaaa, not for cat or human consumption yet. xx

What's This? uwu

A proper title case formatter that actually knows grammar rules! You get:

  • Proper title case formatting that follows English grammar rules 🎯
  • Smart handling of articles, conjunctions, and prepositions 😿
  • Dash and underscore cleaning (because who wants ugly separators?) 🌟
  • Custom word exclusion for special cases 🌱
  • Zero runtime dependencies (because we're minimalists!)

Installation

pnpm add @catgirls/better-format
# or yarn/npm if you're feeling traditional :3

Usage

wiggles excitedly First, let's make some ugly strings pretty:

import formatBetter from "@catgirls/better-format";

// Basic title case - so easy!
formatBetter("hello world"); // "Hello World"
formatBetter("THE QUICK BROWN FOX"); // "The Quick Brown Fox"

// Smart grammar handling - articles stay lowercase!
formatBetter("a tale of two cities"); // "A Tale of Two Cities"
formatBetter("lord of the rings"); // "Lord of the Rings"

// Handles punctuation like a boss
formatBetter("mr. smith goes to washington"); // "Mr. Smith Goes to Washington"
formatBetter("title: subtitle here"); // "Title: Subtitle Here"

// Even works with contractions! *purrs*
formatBetter("don't stop believing"); // "Don't Stop Believing"

Smart Grammar Rules

Meow! We follow proper English title case rules:

// Articles (a, an, the) stay lowercase
formatBetter("the lord of the rings"); // "The Lord of the Rings"

// Conjunctions (and, or, but, etc.) stay lowercase
formatBetter("fast and furious"); // "Fast and Furious"

// Prepositions (of, to, in, etc.) stay lowercase
formatBetter("journey to the center"); // "Journey to the Center"

// BUT they get capitalized at the end!
formatBetter("something to live for"); // "Something to Live For"

Options ʕ•ᴥ•ʔ

Need more control? We've got options:

// Keep specific words exactly as they are
formatBetter("this API stays uppercase", {
  excludeWords: ["API"],
}); // "This API Stays Uppercase"

// Disable dash cleaning
formatBetter("test-case-here", {
  enableDashCleaning: false,
}); // "Test-case-here"

// Disable underscore cleaning
formatBetter("snake_case_string", {
  enableUnderscoreCleaning: false,
}); // "Snake_case_string"

Why This? (。♥‿♥。)

Because toUpperCase() on every word makes you look like a caveman. This package gives you:

  • Proper English grammar rules (not just CAPITALIZE EVERYTHING)
  • Smart punctuation handling for real-world text
  • Automatic dash/underscore cleaning for slugs and filenames
  • Custom exclusions for brand names, acronyms, etc.
  • Zero dependencies because bloat is bad

API

formatBetter(str, options?)

The main function that makes strings actually readable.

Parameters:

  • str: string - The string to format
  • options?: FormatterOptions - Optional formatting options

Options:

  • excludeWords?: string[] - Words to keep exactly as provided
  • enableDashCleaning?: boolean - Replace dashes with spaces (default: true)
  • enableUnderscoreCleaning?: boolean - Replace underscores with spaces (default: true)

License

MIT - Do whatever you want! ₍⸍⸌̣ʷ̣̫⸍̣⸌₎


made with <3 by catgirls from vatican city purrs contentedly at properly formatted text