Skip to content

Commit 81740ff

Browse files
refactor: replace intern use of helper.randomize (#687)
1 parent 3aea453 commit 81740ff

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/finance.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ export class Finance {
4949
*/
5050
accountName(): string {
5151
return [
52-
this.Helpers.randomize(this.faker.definitions.finance.account_type),
52+
this.faker.random.arrayElement(
53+
this.faker.definitions.finance.account_type
54+
),
5355
'Account',
5456
].join(' ');
5557
}
@@ -160,7 +162,7 @@ export class Finance {
160162
* faker.finance.transactionType() // 'payment'
161163
*/
162164
transactionType(): string {
163-
return this.Helpers.randomize(
165+
return this.faker.random.arrayElement(
164166
this.faker.definitions.finance.transaction_type
165167
);
166168
}

src/helpers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,9 @@ export class Helpers {
680680
name: [this.faker.finance.accountName(), this.faker.finance.mask()].join(
681681
' '
682682
),
683-
type: this.randomize(this.faker.definitions.finance.transaction_type),
683+
type: this.faker.random.arrayElement(
684+
this.faker.definitions.finance.transaction_type
685+
),
684686
account: this.faker.finance.account(),
685687
};
686688
}

0 commit comments

Comments
 (0)