Skip to content

fix(keyBy): export keyBy from es-toolkit/map #1650

Open
976520 wants to merge 1 commit intotoss:mainfrom
976520:main
Open

fix(keyBy): export keyBy from es-toolkit/map #1650
976520 wants to merge 1 commit intotoss:mainfrom
976520:main

Conversation

@976520
Copy link

@976520 976520 commented Mar 17, 2026

Problem

keyBy for Map objects was implemented in src/map/keyBy.ts and documented at https://es-toolkit.dev/reference/map/keyBy.html, but was not exported from src/map/index.ts

This caused an import error when users followed the documented usage

import { keyBy } from 'es-toolkit/map';
// SyntaxError: The requested module 'es-toolkit/map' does not provide an export named 'keyBy'                                        

Closes #1648

Solution

Add the missing export to src/map/index.ts

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.

Module 'es-toolkit/map' has no exported member 'keyBy' (ts2305)

1 participant