From 81740ff1946d02587e7b72a81f9a5c7f015474c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leyla=20J=C3=A4hnig?= <77127505+xDivisionByZerox@users.noreply.github.com> Date: Sat, 26 Mar 2022 19:02:19 +0100 Subject: [PATCH] refactor: replace intern use of helper.randomize (#687) --- 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(), }; }