Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Oct 26, 2024
1 parent f213812 commit d1a313c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/simple-faker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,13 @@ export class SimpleFaker {
seed?: number;
} = {}
) {
const {
seed: originalSeed,
seed = randomSeed(),
randomizer: originalRandomizer,
randomizer = generateMersenne53Randomizer(seed),
} = options;
const { seed, randomizer } = options;

if (originalRandomizer != null && originalSeed != null) {
if (seed != null && randomizer != null) {
randomizer.seed(seed);
}

this._randomizer = randomizer;
this._randomizer = randomizer ?? generateMersenne53Randomizer(seed);
}

/**
Expand Down

0 comments on commit d1a313c

Please sign in to comment.