aboutsummaryrefslogtreecommitdiff
path: root/src/modules/number
diff options
context:
space:
mode:
authorShinigami <[email protected]>2022-12-17 19:59:25 +0100
committerGitHub <[email protected]>2022-12-17 19:59:25 +0100
commit0b2fa1ae96c6aabb7bcaae8d7f5f90df86d43786 (patch)
treede18ddcb77c383a761e370067c259e70f976bd60 /src/modules/number
parentb7dbfaca9790b23210a56615d56913b0acccb24c (diff)
downloadfaker-0b2fa1ae96c6aabb7bcaae8d7f5f90df86d43786.tar.xz
faker-0b2fa1ae96c6aabb7bcaae8d7f5f90df86d43786.zip
feat(number)!: change int default params (#1643)
Diffstat (limited to 'src/modules/number')
-rw-r--r--src/modules/number/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/number/index.ts b/src/modules/number/index.ts
index 62036ab1..d3f27453 100644
--- a/src/modules/number/index.ts
+++ b/src/modules/number/index.ts
@@ -22,7 +22,7 @@ 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 + 99999`.
+ * @param options.max Upper bound for generated number. Defaults to `Number.MAX_SAFE_INTEGER`.
*
* @throws When options define `max < min`.
*
@@ -42,7 +42,7 @@ export class NumberModule {
options = { max: options };
}
- const { min = 0, max = min + 99999 } = options;
+ const { min = 0, max = Number.MAX_SAFE_INTEGER } = options;
const effectiveMin = Math.ceil(min);
const effectiveMax = Math.floor(max);