Back to Explore

sindresorhus/decamelize

GitHub
1 watchersOpen source

Last release:

Decamelize converts camelized strings into lowercased strings, with a customizable word separator (for example, unicornRainbow becomes unicorn_rainbow). It can optionally preserve consecutive uppercase character sequences, which is useful when transforming identifiers or labels consistently.

Project status

  • Actively maintained: The most recent upstream push is 2026-03-10, and the package has a recent published update (v6.0.1 on 2025-08-19), suggesting the project is still being worked on rather than dormant.
  • Update cadence: After the major change in v6.0.0 (2021-10-01), the next published update was v6.0.1 (2025-08-19), which is a long gap, but there is evidence of ongoing activity in 2026 (at least commits) without a newer published version shown in the provided summaries.

AI summary generated

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

Recent updates

  • v6.0.1

    v6.0.1 focuses on improving performance for extreme edge-cases in the decamelize logic. The main change is a regex update in the preserveConsecutiveUppercase handling, plus various tooling and documentation adjustments.

    Breaking
  • v6.0.0

    v6.0.0 is a major release that converts the decamelize package to pure ESM and raises the minimum Node.js requirement. The code changes are mostly centered around module format and TypeScript declaration alignment, with the runtime logic remaining effectively the same.

    Breaking
  • v5.0.1

    Release v5.0.1 makes a small change labeled as a performance improvement. The code change updates the core decamelization regular expression, and tests/README are adjusted slightly, but the release notes do not describe any behavioral differences.

    Security
  • v5.0.0

    v5.0.0 changes the public API of decamelize to accept an options object instead of a top-level separator argument. It also adds a new preserveConsecutiveUppercase option and adjusts the implementation, TypeScript types, docs, and tests accordingly.

    BreakingFeatures
  • v4.0.0

    v4.0.0 drops the `xregexp` dependency and raises the minimum supported Node.js version to 10. The core decamelize logic was rewritten to use native Unicode property regexes instead of `xregexp`, and tests were updated to cover acronym and trailing-number edge cases.

    Breaking
  • v3.2.0

    v3.2.0 refactors the TypeScript typings to be CommonJS compatible. The codebase also adds a runtime `default` export alias for interop, and updates TS type tests and a couple dev dependencies.

  • v3.1.1

    v3.1.1 is a small patch release that corrects the runtime type validation for the `separator` argument. The release notes only mention fixing the `separator` option type check.

  • v3.1.0

    Release v3.1.0 makes a small change around argument validation for the decamelize function, with the goal of ensuring the `separator` argument is a string. The code diff also updates TypeScript typings/doc comments and switches the type-test tooling in the dev environment.

  • v3.0.0

    v3.0.0 introduces TypeScript definition files for the package, improving developer experience for typed usage. The release also raises the minimum supported Node.js version, which may require environment updates before upgrading.

    BreakingFeatures