change-case
Comprehensive string case conversion library supporting camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, dot.case, path/case, and more. Modular design — import only the specific case converters needed. Handles Unicode and special characters. The de-facto standard for all-in-one string case conversion in JavaScript/TypeScript projects.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Local computation, MIT licensed. No network, no credentials. Zero security concerns — pure string operations.
⚡ Reliability
Best When
You need multiple string case conversion formats in a single project — one package instead of camelcase + snake-case + kebab-case + other separate packages.
Avoid When
You only need one specific case conversion — use the dedicated single-function package (camelcase, kebab-case, etc.) to minimize dependency footprint.
Use Cases
- • Normalize API response field names across multiple naming conventions in a single import (camelCase for JS, snake_case for Python APIs)
- • Generate correctly-cased identifiers for agent code generation (variables in camelCase, constants in CONSTANT_CASE, CSS classes in kebab-case)
- • Build configuration key transformers that convert between YAML snake_case and JavaScript camelCase representations
- • Implement database column name normalization between snake_case (SQL) and camelCase (ORM/JavaScript)
- • Convert user-input natural language strings to valid identifiers in multiple formats for scaffolding tools
Not For
- • Single-convention projects — use camelcase, snake-case, or similar focused packages if you only need one conversion type
- • High-performance bulk processing of millions of strings — change-case is accurate but not the fastest option for extreme throughput
- • Locale-specific capitalization rules — basic Unicode support only; complex locale rules may need custom handling
Interface
Authentication
Local library — no authentication required. MIT licensed.
Pricing
MIT licensed. Zero cost.
Agent Metadata
Known Gotchas
- ⚠ Import path changed between v4 and v5 — v5 uses named exports from 'change-case' directly: import { camelCase, snakeCase } from 'change-case'; check version before using
- ⚠ camelCase from change-case vs the camelcase package may produce slightly different results for edge cases like 'XMLParser' — test your specific inputs
- ⚠ CONSTANT_CASE (screaming snake) is exported as constantCase, not CONSTANT_CASE — function name casing is lowercase camel despite the output style
- ⚠ v5 is ESM — CommonJS projects should pin to change-case@4 which supports require()
- ⚠ Does not handle all whitespace/delimiter types identically — test with actual input strings from your data source rather than assuming all delimiters work
- ⚠ No batch transformation API — for large arrays, map() over the array manually; change-case provides no array utility functions
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for change-case.
Scores are editorial opinions as of 2026-03-06.