Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private static readRandomType = (p: Parameters): ((seed: number) => RandomGenerator) => {
if (p.randomType == null) return prand.xorshift128plus;
if (typeof p.randomType === 'string') {
switch (p.randomType) {
case 'mersenne':
return prand.mersenne;
case 'congruential':
return prand.congruential;
case 'congruential32':
return prand.congruential32;
case 'xorshift128plus':
return prand.xorshift128plus;
default:
throw new Error(`Invalid random specified: '${p.randomType}'`);
}
}
return p.randomType;
};
private static readNumRuns = (p: Parameters): number => {