aboutsummaryrefslogtreecommitdiff
path: root/src/modules/number/index.ts
diff options
context:
space:
mode:
authorShinigami <[email protected]>2022-12-10 20:18:01 +0100
committerGitHub <[email protected]>2022-12-10 19:18:01 +0000
commit7b50c2f0126ac865d4e4efea360b8ba71f0cb7c6 (patch)
tree9ea854fb4bc1b4ae43d2ce1a409f5ea282961cb3 /src/modules/number/index.ts
parentab9fa1fe5bab671c1888663151ae20374f409c4a (diff)
downloadfaker-7b50c2f0126ac865d4e4efea360b8ba71f0cb7c6.tar.xz
faker-7b50c2f0126ac865d4e4efea360b8ba71f0cb7c6.zip
feat(number): adjust hex default (#1649)
Diffstat (limited to 'src/modules/number/index.ts')
-rw-r--r--src/modules/number/index.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/number/index.ts b/src/modules/number/index.ts
index cef0b27c..62036ab1 100644
--- a/src/modules/number/index.ts
+++ b/src/modules/number/index.ts
@@ -117,12 +117,12 @@ export class NumberModule {
*
* @param options Maximum value or options object. Defaults to `{}`.
* @param options.min Lower bound for generated number. Defaults to `0`.
- * @param options.max Upper bound for generated number. Defaults to `min + 16`.
+ * @param options.max Upper bound for generated number. Defaults to `15`.
*
* @example
* faker.number.hex() // 'b'
- * faker.number.hex(16) // '9'
- * faker.number.hex({ min: 0, max: 65536 }) // 'af17'
+ * faker.number.hex(255) // '9d'
+ * faker.number.hex({ min: 0, max: 65535 }) // 'af17'
*
* @since 8.0.0
*/
@@ -131,7 +131,7 @@ export class NumberModule {
options = { max: options };
}
- const { min = 0, max = min + 16 } = options;
+ const { min = 0, max = 15 } = options;
return this.int({
max,