aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorShraddha Falane <[email protected]>2022-09-08 22:58:27 +0530
committerGitHub <[email protected]>2022-09-08 17:28:27 +0000
commit925db3a0194fba6d5984203a69747265848227ef (patch)
treea3f9e18f42bbae47fc3d4a502e96b660f86025ee /src/modules
parentb9884d098d6e14001da36acfba6fbfebdcef8fea (diff)
downloadfaker-925db3a0194fba6d5984203a69747265848227ef.tar.xz
faker-925db3a0194fba6d5984203a69747265848227ef.zip
fix: improve default seed initialization (#1334)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/mersenne/index.ts2
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)) {