diff options
| author | Saurabh kumar <[email protected]> | 2024-06-13 15:44:46 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-13 10:14:46 +0000 |
| commit | a5ffca1c7863531d459f67cbab7bd9ba34d16904 (patch) | |
| tree | 14c8100e1e51042319720634b5badb8bd655df85 /src/modules | |
| parent | 2a2a13200acd858a2ee45e43072f55888511fb8d (diff) | |
| download | faker-a5ffca1c7863531d459f67cbab7bd9ba34d16904.tar.xz faker-a5ffca1c7863531d459f67cbab7bd9ba34d16904.zip | |
refactor(locale)!: use singular locale definition keys (#2932)
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/lorem/index.ts | 2 | ||||
| -rw-r--r-- | src/modules/system/index.ts | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/lorem/index.ts b/src/modules/lorem/index.ts index 1f9ba026..785b5a96 100644 --- a/src/modules/lorem/index.ts +++ b/src/modules/lorem/index.ts @@ -79,7 +79,7 @@ export class LoremModule extends ModuleBase { return this.faker.helpers.arrayElement( filterWordListByLength({ ...opts, - wordList: this.faker.definitions.lorem.words, + wordList: this.faker.definitions.lorem.word, }) ); } diff --git a/src/modules/system/index.ts b/src/modules/system/index.ts index 1fcc9be3..57d52ca2 100644 --- a/src/modules/system/index.ts +++ b/src/modules/system/index.ts @@ -114,7 +114,7 @@ export class SystemModule extends ModuleBase { * @since 3.1.0 */ mimeType(): string { - const mimeTypeKeys = Object.keys(this.faker.definitions.system.mime_types); + const mimeTypeKeys = Object.keys(this.faker.definitions.system.mime_type); return this.faker.helpers.arrayElement(mimeTypeKeys); } @@ -152,7 +152,7 @@ export class SystemModule extends ModuleBase { * @since 3.1.0 */ fileType(): string { - const mimeTypes = this.faker.definitions.system.mime_types; + const mimeTypes = this.faker.definitions.system.mime_type; const typeSet = new Set( Object.keys(mimeTypes).map((key) => key.split('/')[0]) @@ -172,7 +172,7 @@ export class SystemModule extends ModuleBase { * @since 3.1.0 */ fileExt(mimeType?: string): string { - const mimeTypes = this.faker.definitions.system.mime_types; + const mimeTypes = this.faker.definitions.system.mime_type; if (typeof mimeType === 'string') { return this.faker.helpers.arrayElement(mimeTypes[mimeType].extensions); @@ -193,7 +193,7 @@ export class SystemModule extends ModuleBase { * @since 3.1.0 */ directoryPath(): string { - const paths = this.faker.definitions.system.directory_paths; + const paths = this.faker.definitions.system.directory_path; return this.faker.helpers.arrayElement(paths); } |
