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 (number) / inRange function #255

Merged
merged 6 commits into from
Feb 21, 2024

Conversation

mertdy
Copy link
Contributor

@mertdy mertdy commented Feb 14, 2023

Description

The equivalent of lodash's inRange function. lodash.inRange

Checklist

  • Changes are covered by tests if behavior has been changed or added
  • Tests have 100% coverage
  • If code changes were made, the version in package.json has been bumped (matching semver)
  • If code changes were made, the yarn build command has been run and to update the cdn directory
  • If code changes were made, the documentation (in the /docs directory) has been updated

Resolves

None. It is a new feature.

@vercel
Copy link

vercel bot commented Feb 14, 2023

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

Name Status Preview Comments Updated (UTC)
radash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 2:02am

@mertdy mertdy changed the title Feat/in range function Feat (number) / inRange function Feb 14, 2023
@Noitidart
Copy link

I don't know if we want equivalent of inRange. Lodash inRange is extremely funky. The most minor is that the 2nd value is exclusive. And they have variadic behavior which is confusing. Maybe to simplify, both start and end should be inclusive by default, with option to make it exclusive. And maybe we can remove the variadic behavior and it should always take 4 values: value, start, end, options.

Copy link
Owner

@sodiray sodiray left a comment

Choose a reason for hiding this comment

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

Hey @mertdy sorry for the very long delay here. I love this PR, I love the docs, the build, the format. You're making it easy on me.

I just had one small comment. If you're still interested in getting this in we can release asap.

src/number.ts Outdated Show resolved Hide resolved
@mertdy
Copy link
Contributor Author

mertdy commented Nov 6, 2023

Hey @rayepps, I added overloading functions. If you have time to review, we can proceed the PR.

@sodiray sodiray merged commit 70a117b into sodiray:master Feb 21, 2024
4 of 8 checks passed
@sodiray
Copy link
Owner

sodiray commented Feb 21, 2024

Thank you @mertdy finally merged it 🙃 🎉 will go out in next release of v12.0.0 (likely today)

aleclarson referenced this pull request in radashi-org/radashi Jun 24, 2024
* Add inRange function

* Match with lodash inRange function

* Build cdn

* Add overloading functions

* Build cdn

---------

Co-authored-by: Ray Epps <ray@unishine.dev>
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.

None yet

3 participants