es-toolkit icon indicating copy to clipboard operation
es-toolkit copied to clipboard

feat(orderBy, isSymbol): add compatibility with lodash

Open dayongkr opened this issue 1 year ago • 6 comments

Description

I implement a compat/orderBy.

It is slower than es-toolkit/orderBy, but it is faster than lodash/orderBy. This is because lodash converts same strings to paths (e.g., "user.name" to ["user", "name"]) during each comparison, whereas I convert the string to a path only once before sorting or comparing.

Benchmark

Screenshot 2024-08-08 at 11 12 11 PM

close #328

dayongkr avatar Aug 08 '24 10:08 dayongkr

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

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 08 '24 10:08 vercel[bot]

Codecov Report

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

Project coverage is 99.82%. Comparing base (bb94b88) to head (5c3d379).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #357   +/-   ##
=======================================
  Coverage   99.82%   99.82%           
=======================================
  Files         142      144    +2     
  Lines        1116     1151   +35     
  Branches      299      311   +12     
=======================================
+ Hits         1114     1149   +35     
  Misses          2        2           

codecov-commenter avatar Aug 08 '24 13:08 codecov-commenter

I also implement isSymbol, but PR #359 also implement isSymbol.

dayongkr avatar Aug 09 '24 02:08 dayongkr

Let me check this during the weekend :)

raon0211 avatar Aug 09 '24 02:08 raon0211

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 10, 2024 7:29am

vercel[bot] avatar Aug 09 '24 02:08 vercel[bot]

Let me check this during the weekend :)

Thanks!

And if the PR(#359) is merged, then I will fix this PR before the review.

dayongkr avatar Aug 09 '24 02:08 dayongkr