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(utils): add toNumber, toFinite, toInteger in compat layer #569

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dayongkr
Copy link
Contributor

@dayongkr dayongkr commented Sep 21, 2024

Description

I added these functions in es-toolit/compat/utils.

We we don't have es-toolkit/utils, so I didn't add these functions in es-toolkit/utils.

If these functions also need in es-toolkit, could you recommend which folder would be best to create it in?

Benchmarks

toNumber

Screenshot 2024-09-21 at 4 48 32 PM

toFinite

Screenshot 2024-09-21 at 4 48 49 PM

toInteger

Screenshot 2024-09-21 at 4 48 19 PM

close #567

Copy link

vercel bot commented Sep 21, 2024

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 Sep 21, 2024 7:56am

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.25%. Comparing base (fd119dd) to head (3d80f79).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #569      +/-   ##
==========================================
- Coverage   99.29%   99.25%   -0.05%     
==========================================
  Files         228      231       +3     
  Lines        1989     2005      +16     
  Branches      550      557       +7     
==========================================
+ Hits         1975     1990      +15     
- Misses         13       14       +1     
  Partials        1        1              

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 toFinite, toInteger, toNumber in compat layer
2 participants