From 535a8f0764b220701c3b6ee6c5af4ce112f19965 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Sat, 26 Mar 2022 17:28:02 +0100 Subject: [PATCH] refactor: replace intern use of helper.randomize --- src/finance.ts | 6 ++++-- src/helpers.ts | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/finance.ts b/src/finance.ts index 10e0b85395d..25d44046158 100644 --- a/src/finance.ts +++ b/src/finance.ts @@ -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(' '); } @@ -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 ); } diff --git a/src/helpers.ts b/src/helpers.ts index 286ecc41607..38e70c29869 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -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(), }; }