diff options
| author | Shraddha Falane <[email protected]> | 2022-09-08 22:58:27 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-08 17:28:27 +0000 |
| commit | 925db3a0194fba6d5984203a69747265848227ef (patch) | |
| tree | a3f9e18f42bbae47fc3d4a502e96b660f86025ee /src/modules | |
| parent | b9884d098d6e14001da36acfba6fbfebdcef8fea (diff) | |
| download | faker-925db3a0194fba6d5984203a69747265848227ef.tar.xz faker-925db3a0194fba6d5984203a69747265848227ef.zip | |
fix: improve default seed initialization (#1334)
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/mersenne/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/mersenne/index.ts b/src/modules/mersenne/index.ts index 5f60e867..f551edf3 100644 --- a/src/modules/mersenne/index.ts +++ b/src/modules/mersenne/index.ts @@ -8,7 +8,7 @@ export class MersenneModule { private gen = new Gen(); constructor() { - this.gen.initGenrand(new Date().getTime() % 1000000000); + this.gen.initGenrand(Math.ceil(Math.random() * Number.MAX_SAFE_INTEGER)); // Bind `this` so namespaced is working correctly for (const name of Object.getOwnPropertyNames(MersenneModule.prototype)) { |
