change-case

Transform strings between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, and more

Library
npm
v5.4.4
2,405 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
45 /100 Fair
Development Activity 0
Maintenance 32
Community 48
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
80 /100 Excellent
Architecture 78
Code Quality 85
Innovation 65
Learning Curve 90

change-case is a small, dependency-free TypeScript library for converting strings between virtually every common casing convention — camelCase, PascalCase, snake_case, kebab-case (param-case), CONSTANT_CASE, Capital Case, dot.case, path/case, and more — as one package exporting a dedicated function per case.

As of v5, the project consolidated what used to be a dozen+ separately published packages (camel-case, pascal-case, snake-case, param-case, etc.) into this single change-case package sharing one word-splitting engine, so consumers pull in one dependency instead of a chain of tiny ones.

What You Get

  • Dedicated conversion functions for camelCase, pascalCase, snakeCase, kebabCase, constantCase, capitalCase, dotCase, pathCase, sentenceCase, and more, all from one package
  • A shared, locale-aware split() word-boundary engine that correctly handles Unicode, acronyms, and embedded numbers
  • Configurable options per conversion (custom delimiter, prefix/suffix character preservation, custom split function)
  • Zero runtime dependencies and full TypeScript types out of the box
  • Companion packages (sponge-case, swap-case, title-case) in the same monorepo for less common transformations

Common Use Cases

  • Converting API response keys from snake_case to camelCase (or vice versa) at a serialization boundary
  • Generating consistent file, class, or variable names from user input or CMS-entered titles in a code generator
  • Normalizing CSS class names or HTML attribute names between kebab-case and camelCase in a styling utility
  • Building CLI scaffolding tools that need to derive multiple casing variants of a single project/feature name

Under The Hood

Architecture — The monorepo (managed via ts-scripts) currently ships four packages under packages/: the consolidated change-case package containing every mainstream case converter as named exports from one src/index.ts, plus three standalone packages (sponge-case, swap-case, title-case) for transformations that don’t fit the shared splitting model. change-case’s core is a regex-based split() function using Unicode-aware patterns (\p{Ll}, \p{Lu}) to find word boundaries across lower-to-upper transitions, consecutive-uppercase acronym boundaries, and embedded digits, then every case function (camelCase, snakeCase, etc.) is a thin wrapper that calls split() and re-joins words with the right delimiter and capitalization rule. Tech Stack — Pure TypeScript, ESM-only (type: module), built and tested via the shared ts-scripts tooling with Vitest for both specs (*.spec.ts) and benchmarks (bench script), no runtime dependencies at all. Code Quality — Every exported function has a colocated .spec.ts file (index.spec.ts, keys.spec.ts) exercising edge cases like consecutive acronyms and Unicode input; the package is feature-complete and stable but has seen no commits in roughly a year, reflecting a mature, effectively ‘done’ library rather than active development. API Design — The v5 redesign’s biggest ergonomic win is exporting every case function from one root import (import { camelCase, snakeCase } from 'change-case') instead of installing a separate package per case, while keeping each function’s signature simple (string in, options object optional, string out) with no class instances or configuration objects required for the common path.

Used by 24 apps in this directory

Go
36%

OpenPanel

Devops · Hosting Control Panel

764

Docker-powered web hosting control panel that gives every user a fully isolated environment with dedicated web server, database, and networking — VPS-grade security on shared hardware.

View details
87
Repo Health
75
Technical
63
Dependency
Built with
Go 36%
HTML 30%
TypeScript 24%
Updated 6 days ago
TypeScript
90%
MIT

Plasmic

CMS · Design Tools · Low Code Platforms

7,125

The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.

View details
81
Repo Health
78
Technical
64
Dependency
Built with
TypeScript 90%
Updated 6 days ago
TypeScript
97%
Other

Rocket.Chat

Team Chat

46,304

The secure, self-hosted team communications platform for organizations that cannot compromise on data sovereignty.

View details
96
Repo Health
79
Technical
63
Dependency
Built with
TypeScript 97%
Updated 5 days ago
Go
66%
AGPL 3.0

Vikunja

Project Management

5,833

Self-hosted task management with natural-language quick-add, multiple views, and a fully documented REST API — your tasks, your infrastructure, zero lock-in.

View details
86
Repo Health
81
Technical
65
Dependency
Built with
Go 66%
TypeScript 24%
Updated 5 days ago
TypeScript
99%
AGPL 3.0

Webstudio

Design Tools · No Code Platforms

9,103

Open source visual development platform with complete CSS control, headless CMS integration, and full infrastructure ownership

View details
91
Repo Health
79
Technical
60
Dependency
Built with
TypeScript 99%
Updated 6 days ago
TypeScript
99%
AGPL 3.0

Webstudio

Design Tools · No Code Platforms

9,103

Open source visual development platform with complete CSS control, headless CMS integration, and full infrastructure ownership

View details
91
Repo Health
79
Technical
60
Dependency
Built with
TypeScript 99%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers