Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(countBy): Add countBy function #117

Merged
merged 6 commits into from
Jul 3, 2024
Merged

Conversation

l2hyunwoo
Copy link
Contributor

close #88

I added countBy function that count the occurrences of each item in an array based on a transformation function.

스크린샷 2024-07-03 오전 8 35 16 스크린샷 2024-07-03 오전 12 56 52

@l2hyunwoo l2hyunwoo requested a review from raon0211 as a code owner July 2, 2024 23:35
Copy link

vercel bot commented Jul 2, 2024

@l2hyunwoo is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e7472e0) to head (e8c1e25).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #117   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           58        60    +2     
  Lines          314       325   +11     
  Branches        37        39    +2     
=========================================
+ Hits           314       325   +11     

Copy link

codspeed-hq bot commented Jul 2, 2024

CodSpeed Performance Report

Merging #117 will degrade performances by 88.97%

Comparing l2hyunwoo:feature/#88 (44f33b4) with l2hyunwoo:feature/#88 (e8c1e25)

Summary

⚡ 3 improvements
❌ 7 regressions
✅ 98 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark l2hyunwoo:feature/#88 l2hyunwoo:feature/#88 Change
es-toolkit/countBy 70.2 µs 55.5 µs +26.37%
lodash/difference 56.7 µs 337.1 µs -83.17%
lodash/intersectionWith 92 µs 263.2 µs -65.05%
lodash/isNil 35.3 µs 319.7 µs -88.97%
es-toolkit/range 39.2 µs 48.3 µs -18.84%
lodash/range 33.4 µs 44.2 µs -24.59%
lodash/unionBy 232.7 µs 75.4 µs ×3.1
lodash/unionWith 84.8 µs 239.8 µs -64.64%
es-toolkit/uniqWith 44.4 µs 38.4 µs +15.52%
lodash/xor 255.6 µs 397.5 µs -35.68%

src/array/countBy.ts Outdated Show resolved Hide resolved
src/array/countBy.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@raon0211 raon0211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your great contribution!

@raon0211 raon0211 merged commit 373d63b into toss:main Jul 3, 2024
7 of 8 checks passed
@l2hyunwoo l2hyunwoo deleted the feature/#88 branch July 3, 2024 01:10
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.

Support for countBy
3 participants