diff options
| author | An Nguyen <[email protected]> | 2023-05-25 00:29:56 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-25 09:29:56 +0200 |
| commit | f901e3d48d51c09d253893bbc2099c4ef1b9dd2c (patch) | |
| tree | 156ef417640330a6f704055e16dd19d91ce759c1 /docs/guide | |
| parent | b6005475c046f88addad5e77315c6f8a01ec6e79 (diff) | |
| download | faker-f901e3d48d51c09d253893bbc2099c4ef1b9dd2c.tar.xz faker-f901e3d48d51c09d253893bbc2099c4ef1b9dd2c.zip | |
docs(number): update default max value (#2176)
Diffstat (limited to 'docs/guide')
| -rw-r--r-- | docs/guide/upgrading.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/guide/upgrading.md b/docs/guide/upgrading.md index 8dc353d1..d20a3113 100644 --- a/docs/guide/upgrading.md +++ b/docs/guide/upgrading.md @@ -284,12 +284,14 @@ By default, `faker.number.float` no longer defaults to a precision of 0.01 ```js // OLD +faker.datatype.number(); // 88999 (NOTE: The default max was 99999) faker.datatype.number({ max: 100 }); // 35 faker.datatype.number({ max: 100, precision: 0.01 }); // 35.21 faker.datatype.float({ max: 100 }); // 35.21 faker.datatype.float({ max: 100, precision: 0.001 }); // 35.211 // NEW +faker.number.int({ max: 99999 }); // 88999 (NOTE: the default max is now Number.MAX_SAFE_INTEGER) faker.number.int({ max: 100 }); // 35 faker.number.float({ max: 100 }); // 35.21092065742612 faker.number.float({ max: 100, precision: 0.01 }); // 35.21 |
