Commit 4fc7cd9b authored by cjihrig's avatar cjihrig Committed by Rich Trott
Browse files

lib: support min/max values in validateInteger()

This commit updates validateInteger() in two ways:

- Number.isInteger() is used instead of Number.isSafeInteger().
  This ensures that all integer values are supported.
- Minimum and maximum values are supported. They default to
  the min and max safe integer values, but can be customized.

PR-URL: https://github.com/nodejs/node/pull/28810


Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
parent 52c5287a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment