random-js: make engine optional for uuid4()

This commit is contained in:
Joe MacMahon 2018-08-22 12:07:39 +01:00
parent b524207965
commit 7cc9fb1a9d
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ interface Random {
sample<T>(population: T[], sampleSize: number): T[];
die(sideCount: number): number;
dice(sideCount: number, dieCount: number): number[];
uuid4(engine: Random.Engine): string;
uuid4(engine?: Random.Engine): string;
string(engine: Random.Engine, length: number): string;
string(length?: number, pool?: string): string;
hex(length?: number, upperCase?: boolean): string;

View File

@ -86,7 +86,8 @@ sampled = random.sample(customTypeArray, 2);
numeric = random.die(5);
dieValues = random.dice(5, 2);
uuid = Random.uuid4(engine);
uuid = random.uuid4(engine);
uuid = random.uuid4();
str = random.string();
str = random.string(10);