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

Java
56%
Apache 2.0

Kestra

Automation · Data Engineering · Devops

29,967

Event-driven orchestration platform for data, AI, and infrastructure workflows — define everything in YAML, run anywhere at scale.

View details
94
Repo Health
81
Technical
69
Dependency
Built with
Java 56%
TypeScript 29%
Vue 14%
Updated 6 days ago
Clojure
71%
AGPL 3.0

Logseq

Knowledge Management · Note Taking

45,349

A privacy-first, open-source knowledge graph platform combining Markdown, Org-mode, bidirectional linking, and local-first storage for building your second brain.

View details
92
Repo Health
82
Technical
65
Dependency
Built with
Clojure 71%
OCaml 12%
Updated 6 days ago
TypeScript
98%
MPL 2.0

Logto

Authentication

14,769

Open-source auth infrastructure for SaaS and AI apps with OIDC, SAML, and RBAC

View details
92
Repo Health
83
Technical
63
Dependency
Built with
TypeScript 98%
Updated 6 days ago
TypeScript
81%
AGPL 3.0

massCode

Code Editors · Developer Tools · Productivity

7,085

A free, local-first developer workspace unifying snippets, notes, HTTP requests, calculations, drawings, and dev tools in one desktop app.

View details
85
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 81%
Vue 17%
Updated 2 weeks ago
TypeScript
96%
AGPL 3.0

Midday

Invoicing Finance · Productivity

15,091

All-in-one AI-powered business operations platform for freelancers and solo entrepreneurs to manage invoicing, time tracking, banking, and financial intelligence.

View details
51
Repo Health
78
Technical
67
Dependency
Built with
TypeScript 96%
Updated 4 months ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated 6 days ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated 6 days ago
TypeScript
26%
AGPL 3.0

Omnivore

Bookmarks Archiving · Knowledge Management · Note Taking

16,356

Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.

View details
90
Repo Health
74
Technical
65
Dependency
Built with
TypeScript 26%
JavaScript 24%
HTML 20%
Updated 6 days ago
TypeScript
26%
AGPL 3.0

Omnivore

Bookmarks Archiving · Knowledge Management · Note Taking

16,356

Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.

View details
90
Repo Health
74
Technical
65
Dependency
Built with
TypeScript 26%
JavaScript 24%
HTML 20%
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