Back to Explore

sindresorhus/camelcase

GitHub
1 updates · last 90 daysOpen source

Last release:

Converts strings (or arrays of strings) from dash, dot, underscore, or space separated formats into camelCase, with an option to output PascalCase. It also handles Unicode correctly, making it useful when normalizing user input or identifiers into JavaScript-style casing.

Project status

  • Actively maintained, most recently updated on 2026-10-12 (v10.0.0), with changes focused on Unicode casing and digit handling.
  • Apparent update cadence is roughly every 9 to 12 months in the most recent cycle (v9.0.0 on 2025-11-10, then v10.0.0 on 2026-10-12).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v10.0.0

    camelcase v10.0.0 primarily updates Unicode handling and requires Node.js 22. It includes fixes for casing of letters outside the Basic Multilingual Plane, improved handling of uppercase preservation when combined with capitalizeAfterNumber: false, and treats decimal digits from all scripts as numeric.

    Breaking
  • v9.0.0

    v9.0.0 raises the minimum supported Node.js version to 20 and adds a new `capitalizeAfterNumber` option. The implementation was refactored around case preservation and word-boundary detection, with a notable behavioral change in how leading underscores are handled.

    BreakingFeatures
  • v8.0.0

    v8.0.0 raises the minimum supported Node.js version to 16 and includes a fix for incorrect camelization behavior. The code changes also show an implementation update to the internal string processing logic (not just a documentation or test tweak), with additional test coverage for digit and underscore/dash boundaries.

    Breaking
  • v7.0.1

    v7.0.1 makes a targeted fix for the `preserveConsecutiveUppercase` option. The code adjusts how camelCase is preserved across consecutive uppercase sequences, and the tests reflect updated expected casing behavior for inputs like `IDs`.

  • v7.0.0

    v7.0.0 makes camelcase a pure ESM package and raises the minimum supported Node.js version to 14. It also changes behavior so that providing a separator character as the entire input returns an empty string.

    Breaking
  • v6.3.0

    v6.3.0 adds support for disabling the platform locale by allowing `locale: false`. The implementation introduces locale-aware `toLowerCase` and `toUpperCase` helper functions and routes case conversions through them, including new tests and documentation.

    Features
  • v6.2.1

    v6.2.1 is presented as an internal readability change, but the diff shows a substantive refactor of the camelCase implementation around Unicode regex handling. It also updates CI configuration, README wording/examples, and test coverage.

  • v6.2.0

    Release v6.2.0 adds a new boolean option, preserveConsecutiveUppercase, to control how consecutive uppercase sequences are handled during camelCase/PascalCase conversion. The implementation also refactors the casing and post-processing pipeline to route through the new option.

    Features
  • v6.1.0

    v6.1.0 primarily adds a new `locale` option to control locale-specific upper/lowercasing during camelCase/PascalCase conversion. The implementation threads the locale through all case conversions (including special handling for preserving existing casing), and updates TypeScript typings and tests accordingly.

    Features
  • v6.0.0

    v6.0.0 raises the minimum supported Node.js version to 10 and updates camelcase conversion logic to better handle Unicode casing. The code also includes several additional behavioral and TypeScript typing changes beyond what the release notes explicitly describe.

    BreakingFeatures
  • v5.3.1

    v5.3.1 contains a targeted change to camelcase conversion logic intended to fix a regression in how numbers are handled. The release notes only state that numbers treatment was fixed, but the code change shows a concrete behavior update for letters following digit sequences.