Mersenne

Module to generate seed based random numbers.

Rand

Generates a random number between [min, max).

Parameters

NameTypeDefaultDescription
maxnumber32768

The maximum number.

minnumber0

The minimum number.

Returns: number

faker.mersenne.rand(max: number = 32768, min: number = 0): number
faker.mersenne.rand() // => 17983
faker.mersenne.rand() // 15515
faker.mersenne.rand(500, 1000) // 578

Seed

Sets the seed to use.

Parameters

NameTypeDefaultDescription
Snumber

The seed to use.

Returns: void

faker.mersenne.seed(S: number): void

Seed_array

Sets the seed to use.

Parameters

NameTypeDefaultDescription
Anumber[]

The seed to use.

Returns: void

faker.mersenne.seed_array(A: number[]): void