aboutsummaryrefslogtreecommitdiff
path: root/src/modules/helpers
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-11-06 09:40:49 +0100
committerGitHub <[email protected]>2023-11-06 08:40:49 +0000
commit48a7af4f0470115945ab166b540d0bedc7e5eb20 (patch)
treeb6344afcc6f9fca2d16555d5e3495439952b9a57 /src/modules/helpers
parent358572d9e76f4cd22bfcb09c092a1eaf3a31f005 (diff)
downloadfaker-48a7af4f0470115945ab166b540d0bedc7e5eb20.tar.xz
faker-48a7af4f0470115945ab166b540d0bedc7e5eb20.zip
refactor: simplify module creation (#2485)
Diffstat (limited to 'src/modules/helpers')
-rw-r--r--src/modules/helpers/index.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts
index 4c64be4e..ff93f2ca 100644
--- a/src/modules/helpers/index.ts
+++ b/src/modules/helpers/index.ts
@@ -1,7 +1,7 @@
import type { Faker, SimpleFaker } from '../..';
import { FakerError } from '../../errors/faker-error';
-import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions';
import { deprecated } from '../../internal/deprecated';
+import { SimpleModuleBase } from '../../internal/module-base';
import { luhnCheckValue } from './luhn-check';
import type { RecordKey } from './unique';
import * as uniqueExec from './unique';
@@ -161,7 +161,7 @@ function legacyRegexpStringParse(
/**
* Module with various helper methods providing basic (seed-dependent) operations useful for implementing faker methods (without methods requiring localized data).
*/
-export class SimpleHelpersModule {
+export class SimpleHelpersModule extends SimpleModuleBase {
/**
* Global store of unique values.
* This means that faker should *never* return duplicate values across all API methods when using `faker.helpers.unique` without passing `options.store`.
@@ -170,10 +170,6 @@ export class SimpleHelpersModule {
*/
private readonly uniqueStore: Record<RecordKey, RecordKey> = {};
- constructor(protected readonly faker: SimpleFaker) {
- bindThisToMemberFunctions(this);
- }
-
/**
* Slugifies the given string.
* For that all spaces (` `) are replaced by hyphens (`-`)