From 801e9e0a6afa2bd472652eb7aaee5581ef458342 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Mon, 14 Nov 2022 17:56:49 -0500 Subject: refactor(string): rename params (#1551) --- src/modules/random/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/modules/random') diff --git a/src/modules/random/index.ts b/src/modules/random/index.ts index 0505744d..cb81935b 100644 --- a/src/modules/random/index.ts +++ b/src/modules/random/index.ts @@ -211,7 +211,11 @@ export class RandomModule { if (typeof options === 'number') { return this.faker.string.alpha(options); } - return this.faker.string.alpha({ ...options, length: options.count }); + return this.faker.string.alpha({ + length: options.count, + casing: options.casing, + exclude: options.bannedChars, + }); } /** @@ -248,7 +252,7 @@ export class RandomModule { }); return this.faker.string.alphanumeric({ length: count, - bannedChars: options.bannedChars, + exclude: options.bannedChars, casing: options.casing, }); } @@ -290,7 +294,7 @@ export class RandomModule { return this.faker.string.numeric({ length, allowLeadingZeros: options.allowLeadingZeros, - bannedDigits: options.bannedDigits, + exclude: options.bannedDigits, }); } } -- cgit v1.2.3