change-case
Transform strings between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, and more
Repository Health
Technical Analysis
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
Kestra
Automation · Data Engineering · Devops
Event-driven orchestration platform for data, AI, and infrastructure workflows — define everything in YAML, run anywhere at scale.
Logseq
Knowledge Management · Note Taking
A privacy-first, open-source knowledge graph platform combining Markdown, Org-mode, bidirectional linking, and local-first storage for building your second brain.
Logto
Authentication
Open-source auth infrastructure for SaaS and AI apps with OIDC, SAML, and RBAC
massCode
Code Editors · Developer Tools · Productivity
A free, local-first developer workspace unifying snippets, notes, HTTP requests, calculations, drawings, and dev tools in one desktop app.
Midday
Invoicing Finance · Productivity
All-in-one AI-powered business operations platform for freelancers and solo entrepreneurs to manage invoicing, time tracking, banking, and financial intelligence.
n8n
Automation · No Code Platforms
Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.
n8n
Automation · No Code Platforms
Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.
Omnivore
Bookmarks Archiving · Knowledge Management · Note Taking
Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.
Omnivore
Bookmarks Archiving · Knowledge Management · Note Taking
Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.