diff options
| author | Piotr Kuczynski <[email protected]> | 2022-04-06 10:25:01 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-06 08:25:01 +0000 |
| commit | bc1a9a47082eeaafd612b98073bb2f8517897795 (patch) | |
| tree | 7f6a86bc859a39e0483b0aeb647cd6b646765927 /src | |
| parent | a8970bdcecce17e92b45af18cd958fe16c6454e1 (diff) | |
| download | faker-bc1a9a47082eeaafd612b98073bb2f8517897795.tar.xz faker-bc1a9a47082eeaafd612b98073bb2f8517897795.zip | |
chore: lorem uses faker.helpers (#786)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lorem.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lorem.ts b/src/lorem.ts index a605aa2f..fc5470c5 100644 --- a/src/lorem.ts +++ b/src/lorem.ts @@ -1,15 +1,10 @@ import type { Faker } from '.'; -import type { Helpers } from './helpers'; /** * Module to generate random texts and words. */ export class Lorem { - private readonly Helpers: Helpers; - constructor(private readonly faker: Faker) { - this.Helpers = faker.helpers; - // Bind `this` so namespaced is working correctly for (const name of Object.getOwnPropertyNames(Lorem.prototype)) { if (name === 'constructor' || typeof this[name] !== 'function') { @@ -85,7 +80,8 @@ export class Lorem { */ slug(wordCount?: number): string { const words = this.faker.lorem.words(wordCount); - return this.Helpers.slugify(words); + + return this.faker.helpers.slugify(words); } /** |
