Skip to content

Replace Array.reduce with Object.fromEntries for object construction - #27305

Draft
dennisoelkers wants to merge 2 commits into
masterfrom
refactor/reduce-to-fromentries
Draft

Replace Array.reduce with Object.fromEntries for object construction#27305
dennisoelkers wants to merge 2 commits into
masterfrom
refactor/reduce-to-fromentries

Conversation

@dennisoelkers

Copy link
Copy Markdown
Member

Description

Motivation and Context

Converts reduce-based object-building patterns (accumulator initialized as {}, one key added per array element) to Object.fromEntries(array.map(...)), matching this repo's documented preference in AGENTS.md.

/nocl Internal refactoring.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

dennisoelkers and others added 2 commits September 7, 2026 10:25
Converts reduce-based object-building patterns (accumulator initialized
as {}, one key added per array element) to Object.fromEntries(array.map(...)),
matching this repo's documented preference in AGENTS.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant