toss / es-toolkit

A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.
https://es-toolkit.slash.page
Other
6.25k stars 263 forks source link

fix(countBy): Support nemeric and symbol keys in `countBy` #433

Closed mass2527 closed 2 weeks ago

mass2527 commented 2 weeks ago

For consistency, the countBy function should support readonly arrays and non-string keys, like groupBy, so I made the change.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
es-toolkit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 26, 2024 1:34pm
codecov-commenter commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.77%. Comparing base (d02ef35) to head (e8c3d1d).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/toss/es-toolkit/pull/433/graphs/tree.svg?width=650&height=150&src=pr&token=8N5S3AR3C7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss)](https://app.codecov.io/gh/toss/es-toolkit/pull/433?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) ```diff @@ Coverage Diff @@ ## main #433 +/- ## ======================================= Coverage 99.77% 99.77% ======================================= Files 165 165 Lines 1325 1325 Branches 357 357 ======================================= Hits 1322 1322 Misses 2 2 Partials 1 1 ```