diff options
| author | Eric Cheng <[email protected]> | 2022-11-14 17:56:49 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-14 22:56:49 +0000 |
| commit | 801e9e0a6afa2bd472652eb7aaee5581ef458342 (patch) | |
| tree | e33cf4d8682583164606e62d49876806664eb9d2 /src/modules/random | |
| parent | 66ccca3e11721647c4c13179eb1e23f13d43ef03 (diff) | |
| download | faker-801e9e0a6afa2bd472652eb7aaee5581ef458342.tar.xz faker-801e9e0a6afa2bd472652eb7aaee5581ef458342.zip | |
refactor(string): rename params (#1551)
Diffstat (limited to 'src/modules/random')
| -rw-r--r-- | src/modules/random/index.ts | 10 |
1 files changed, 7 insertions, 3 deletions
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, }); } } |
