Skip to content

Commit

Permalink
refactor: replace intern use of helper.randomize (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
xDivisionByZerox authored Mar 26, 2022
1 parent 3aea453 commit 81740ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/finance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export class Finance {
*/
accountName(): string {
return [
this.Helpers.randomize(this.faker.definitions.finance.account_type),
this.faker.random.arrayElement(
this.faker.definitions.finance.account_type
),
'Account',
].join(' ');
}
Expand Down Expand Up @@ -160,7 +162,7 @@ export class Finance {
* faker.finance.transactionType() // 'payment'
*/
transactionType(): string {
return this.Helpers.randomize(
return this.faker.random.arrayElement(
this.faker.definitions.finance.transaction_type
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,9 @@ export class Helpers {
name: [this.faker.finance.accountName(), this.faker.finance.mask()].join(
' '
),
type: this.randomize(this.faker.definitions.finance.transaction_type),
type: this.faker.random.arrayElement(
this.faker.definitions.finance.transaction_type
),
account: this.faker.finance.account(),
};
}
Expand Down

0 comments on commit 81740ff

Please sign in to comment.