diff options
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 }); } /** |
