From 3777c446e48a196ea4aae543c89a0944abf74d87 Mon Sep 17 00:00:00 2001 From: Piotr Kuczynski Date: Thu, 10 Nov 2022 08:53:27 +0100 Subject: feat(word): add sample method (#714) Co-authored-by: Shinigami Co-authored-by: ST-DDT --- src/modules/system/index.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/modules/system') diff --git a/src/modules/system/index.ts b/src/modules/system/index.ts index 860ab7b9..8c935c88 100644 --- a/src/modules/system/index.ts +++ b/src/modules/system/index.ts @@ -53,8 +53,8 @@ export class SystemModule { * @param options.extensionCount Define how many extensions the file name should have. A negative number will be treated as `0`. Defaults to `1`. * * @example - * faker.system.fileName() // 'self_enabling_accountability_toys.kpt' - * faker.system.fileName({ extensionCount: 2 }) // 'bike_table.res.vcs' + * faker.system.fileName() // 'faithfully_calculating.u8mdn' + * faker.system.fileName({ extensionCount: 2 }) // 'times_after.swf.ntf' * * @since 3.1.0 */ @@ -68,10 +68,7 @@ export class SystemModule { ): string { const { extensionCount = 1 } = options; - const baseName = this.faker.random - .words() - .toLowerCase() - .replace(/\W/g, '_'); + const baseName = this.faker.word.words().toLowerCase().replace(/\W/g, '_'); if (extensionCount <= 0) { return baseName; -- cgit v1.2.3