From de078de89bf1b52de153f88352cf534811673886 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 3 Apr 2023 17:47:19 +0200 Subject: refactor(finance)!: simplify account implementation (#1992) --- src/modules/finance/index.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/modules') 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 }); } /** -- cgit v1.2.3