diff options
| author | Piotr Kuczynski <[email protected]> | 2022-11-10 08:53:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-10 08:53:27 +0100 |
| commit | 3777c446e48a196ea4aae543c89a0944abf74d87 (patch) | |
| tree | 7cffe439f4a5d7ba5324f3f4a162189740f2577e /src/modules/system | |
| parent | 666ff02cd8b446fdae845d4e3550a85e748b3dbd (diff) | |
| download | faker-3777c446e48a196ea4aae543c89a0944abf74d87.tar.xz faker-3777c446e48a196ea4aae543c89a0944abf74d87.zip | |
feat(word): add sample method (#714)
Co-authored-by: Shinigami <[email protected]>
Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'src/modules/system')
| -rw-r--r-- | src/modules/system/index.ts | 9 |
1 files changed, 3 insertions, 6 deletions
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; |
