aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-04-03 17:47:19 +0200
committerGitHub <[email protected]>2023-04-03 15:47:19 +0000
commitde078de89bf1b52de153f88352cf534811673886 (patch)
treeb31ed78c845eed81202073cd2e8656d75ac37140 /src/modules
parentedc50b69197260f9d3e8ac22f2bf062c9a71c390 (diff)
downloadfaker-de078de89bf1b52de153f88352cf534811673886.tar.xz
faker-de078de89bf1b52de153f88352cf534811673886.zip
refactor(finance)!: simplify account implementation (#1992)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/finance/index.ts14
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 });
}
/**