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: the upstream repo shows updates as recently as 2026-02-02, and additional follow-up updates (v4.0.1) landed seconds after v4.0.0.
  • Update cadence appears bursty rather than steady, with a long gap from the prior major update (v3.0.0 in 2021) to the v4 line in 2026, followed by a same-day patch update.

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