Skip to content

fix(orderBy): issue-1095: Support ordering string and number array - #1096

Closed
lanshunfang wants to merge 2 commits into
toss:mainfrom
lanshunfang:fix/issue-1095-orderBy-typing
Closed

lanshunfang wants to merge 2 commits into
toss:mainfrom
lanshunfang:fix/issue-1095-orderBy-typing

Conversation

@lanshunfang

Copy link
Copy Markdown

@vercel

vercel Bot commented Mar 27, 2025 •

Copy link
Copy Markdown

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 Mar 27, 2025 11:29pm

@dayongkr

dayongkr commented Apr 5, 2025

Copy link
Copy Markdown
Collaborator

Thank you very much for your contribution.

However, ordering only object is the intended behavior. For arrays of numbers and strings, it would be preferable to use the native sort method. 🙏

@dayongkr dayongkr closed this Apr 5, 2025
@dayongkr dayongkr reopened this Apr 5, 2025
@dayongkr

dayongkr commented Apr 5, 2025

Copy link
Copy Markdown
Collaborator

Also, if you use the orderBy function from the es-toolkit/compat package, which is compatible with Lodash, it can handle this case. I recommend using that function!

To manage PRs, I’ll go ahead and close this for now, but feel free to reopen it anytime if further discussion is needed!

This branch was successfully deployed

1 active deployment
Preview — 1ba3f903 Deployed Mar 27, 2025 by vercel[bot]
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.

2 participants