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: add precision to randNumber #230

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

leon
Copy link
Contributor

@leon leon commented Mar 21, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Cannot specify precision of randNumber

Issue Number: #226

What is the new behavior?

to be able to round numbers to closest 10, 100, 1000 you can set the precision of randNumber

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

I hope it conforms to all the coding rules.
:)

* @example
*
* randFloat({ min: 10, max: 20, fraction: 1 })
* // 12.5
Copy link
Member

Choose a reason for hiding this comment

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

Can you please run the docs and see that it looks OK with the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks good
Screenshot 2022-03-22 at 09 29 33

Or would you rather have it one line?

Copy link
Member

Choose a reason for hiding this comment

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

I meant in the live docs website :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahhh :)

I think it will look better if I have it on the same line, I'll change it

Screenshot 2022-03-22 at 10 11 35

to be able to round numbers to closest 10, 100, 1000 you can set the precision of randNumber

ngneat#226
@leon leon force-pushed the feat/randnumber-precision branch from 697340b to 44fdcd6 Compare March 22, 2022 09:13
@leon leon requested a review from NetanelBasal March 22, 2022 09:14
@NetanelBasal NetanelBasal merged commit 4a6e633 into ngneat:main Mar 22, 2022
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

2 participants