Back to Explore

sindresorhus/lowercase-keys

GitHub
1 watchersOpen source

Last release:

Lowercase-keys is a JavaScript utility that creates a new object with all input keys lowercased. It supports conflict handling when multiple original keys map to the same lowercased key (by default, the last value wins).

Project status

  • Actively maintained, with recent commits and published updates (last update v4.0.1 on 2026-02-02), indicating ongoing stewardship rather than dormancy.
  • Apparent update cadence is clustered, with multiple updates on 2026-02-02 (v4.0.1 shortly after v4.0.0), but no additional updates are shown after that date up to 2026-08-13.

AI summary generated

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

Recent updates

  • v4.0.1

    v4.0.1 adds input validation to lowercaseKeys and throws a human-friendly TypeError when the input is not a non-null object. The change is supported by new unit tests covering null, undefined, primitives, and other invalid input types.

    Breaking
  • v4.0.0

    v4.0.0 requires Node.js 20 and adds an `onConflict` option to resolve cases where multiple input keys map to the same lowercased key. The implementation was refactored from a one-pass `Object.fromEntries` approach to an iterative build that can call the conflict handler.

    BreakingSecurityFeatures
  • v3.0.0

    This release (v3.0.0) converts lowercase-keys to a pure ESM package and updates the Node.js minimum version. The implementation is also rewritten in modern ESM style using Object.fromEntries and the TypeScript typings were adjusted to match the new module export shape.

    Breaking
  • v2.0.0

    Version 2.0.0 introduces a required upgrade to Node.js 8, which may break existing installations running older Node versions. It also adds TypeScript definitions to improve type support for developers using this package.

    BreakingFeatures