From 48a7af4f0470115945ab166b540d0bedc7e5eb20 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 6 Nov 2023 09:40:49 +0100 Subject: refactor: simplify module creation (#2485) --- src/modules/lorem/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/modules/lorem') diff --git a/src/modules/lorem/index.ts b/src/modules/lorem/index.ts index 82e557e6..ca71afdf 100644 --- a/src/modules/lorem/index.ts +++ b/src/modules/lorem/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; import { filterWordListByLength } from '../word/filter-word-list-by-length'; /** @@ -13,11 +12,7 @@ import { filterWordListByLength } from '../word/filter-word-list-by-length'; * * The generic [`text()`](https://fakerjs.dev/api/lorem.html#text) method can be used to generate some text between one sentence and multiple paragraphs, while [`slug()`](https://fakerjs.dev/api/lorem.html#slug) generates an URL-friendly hyphenated string. */ -export class LoremModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class LoremModule extends ModuleBase { /** * Generates a word of a specified length. * -- cgit v1.2.3