aboutsummaryrefslogtreecommitdiff
path: root/src/modules/color
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/color')
-rw-r--r--src/modules/color/index.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/modules/color/index.ts b/src/modules/color/index.ts
index 5855cd86..ee626e09 100644
--- a/src/modules/color/index.ts
+++ b/src/modules/color/index.ts
@@ -1,5 +1,4 @@
-import type { Faker } from '../../faker';
-import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions';
+import { ModuleBase } from '../../internal/module-base';
/**
* Color space names supported by CSS.
@@ -171,11 +170,7 @@ function toColorFormat(
*
* For a hex color like `#ff0000` used in HTML/CSS, use [`rgb()`](https://fakerjs.dev/api/color.html#rgb). There are also methods for other color formats such as [`hsl()`](https://fakerjs.dev/api/color.html#hsl), [`cmyk()`](https://fakerjs.dev/api/color.html#cmyk), [`hwb()`](https://fakerjs.dev/api/color.html#hwb), [`lab()`](https://fakerjs.dev/api/color.html#lab), and [`lch()`](https://fakerjs.dev/api/color.html#lch).
*/
-export class ColorModule {
- constructor(private readonly faker: Faker) {
- bindThisToMemberFunctions(this);
- }
-
+export class ColorModule extends ModuleBase {
/**
* Returns a random human-readable color name.
*