Skip to content

Conversation

pluris
Copy link
Contributor

@pluris pluris commented Sep 8, 2023

It has been modified so that Type and range can be checked only with validateNumber.
Below is a modified reference to a similar case.

Refs: #45770

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 8, 2023
validateNumber(percentile, 'percentile');
if (NumberIsNaN(percentile) || percentile <= 0 || percentile > 100)
throw new ERR_OUT_OF_RANGE('percentile', '> 0 && <= 100', percentile);
validateNumber(percentile, 'percentile', 1, 100);
Copy link
Contributor

@deokjinkim deokjinkim Sep 8, 2023

Choose a reason for hiding this comment

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

I tried this approach before, but all the numbers between 0 and 1 are not allowed any more with this PR.
This(#45772 (comment)) is previous discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@deokjinkim Thank you for explaining the history. I'll close it.

@pluris pluris closed this Sep 8, 2023
@pluris pluris deleted the fix/histogram_validate_number branch November 8, 2023 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants