diff options
| author | ST-DDT <[email protected]> | 2023-04-03 17:47:19 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-03 15:47:19 +0000 |
| commit | de078de89bf1b52de153f88352cf534811673886 (patch) | |
| tree | b31ed78c845eed81202073cd2e8656d75ac37140 /src/modules | |
| parent | edc50b69197260f9d3e8ac22f2bf062c9a71c390 (diff) | |
| download | faker-de078de89bf1b52de153f88352cf534811673886.tar.xz faker-de078de89bf1b52de153f88352cf534811673886.zip | |
refactor(finance)!: simplify account implementation (#1992)
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/finance/index.ts | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts index 56b298eb..579bd89b 100644 --- a/src/modules/finance/index.ts +++ b/src/modules/finance/index.ts @@ -135,19 +135,9 @@ export class FinanceModule { options = { length: options }; } - let { length = 8 } = options; - if (length === 0) { - length = 8; - } - - let template = ''; + const { length = 8 } = options; - for (let i = 0; i < length; i++) { - template += '#'; - } - - length = null; - return this.faker.helpers.replaceSymbolWithNumber(template); + return this.faker.string.numeric({ length, allowLeadingZeros: true }); } /** |
