diff options
| author | DivisionByZero <[email protected]> | 2023-12-30 13:19:29 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-30 12:19:29 +0000 |
| commit | 87e0490978ae4fd2a7ca9aab550a475add513ef6 (patch) | |
| tree | 84922009f0d5eb8e998c2bb72698018e049eba07 /src/modules/datatype | |
| parent | c10899b638ae36c09833d4de8d79dd3958d58e5a (diff) | |
| download | faker-87e0490978ae4fd2a7ca9aab550a475add513ef6.tar.xz faker-87e0490978ae4fd2a7ca9aab550a475add513ef6.zip | |
refactor(number): deprecate precision in favor of multipleOf in float (#2564)
Diffstat (limited to 'src/modules/datatype')
| -rw-r--r-- | src/modules/datatype/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index b8830610..daec9640 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -75,7 +75,7 @@ export class DatatypeModule extends SimpleModuleBase { const { min = 0, max = min + 99999, precision = 1 } = options; - return this.faker.number.float({ min, max, precision }); + return this.faker.number.float({ min, max, multipleOf: precision }); } /** @@ -142,7 +142,7 @@ export class DatatypeModule extends SimpleModuleBase { const { min = 0, max = min + 99999, precision = 0.01 } = options; - return this.faker.number.float({ min, max, precision }); + return this.faker.number.float({ min, max, multipleOf: precision }); } /** |
