diff options
| author | Shinigami <[email protected]> | 2022-12-17 19:59:25 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-17 19:59:25 +0100 |
| commit | 0b2fa1ae96c6aabb7bcaae8d7f5f90df86d43786 (patch) | |
| tree | de18ddcb77c383a761e370067c259e70f976bd60 /src/modules/number | |
| parent | b7dbfaca9790b23210a56615d56913b0acccb24c (diff) | |
| download | faker-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.ts | 4 |
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); |
