diff options
| author | ST-DDT <[email protected]> | 2022-12-23 20:42:23 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-23 20:42:23 +0100 |
| commit | 75a31f620c880413c05f012f1924b2ad89fb950c (patch) | |
| tree | 4f1c7fdb26d22962f98ae191f6364689193d8155 /src/modules/location | |
| parent | 4ce8e98fcc19d99bf6df3abb3e24c4667f586076 (diff) | |
| download | faker-75a31f620c880413c05f012f1924b2ad89fb950c.tar.xz faker-75a31f620c880413c05f012f1924b2ad89fb950c.zip | |
feat(helpers): fake from array (#1453)
Diffstat (limited to 'src/modules/location')
| -rw-r--r-- | src/modules/location/index.ts | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts index a4238241..a53c11d7 100644 --- a/src/modules/location/index.ts +++ b/src/modules/location/index.ts @@ -75,10 +75,7 @@ export class LocationModule { * @since 8.0.0 */ city(): string { - const pattern = this.faker.helpers.arrayElement( - this.faker.definitions.location.city - ); - return this.faker.helpers.fake(pattern); + return this.faker.helpers.fake(this.faker.definitions.location.city); } /** @@ -121,10 +118,7 @@ export class LocationModule { * @since 8.0.0 */ street(): string { - const format = this.faker.helpers.arrayElement( - this.faker.definitions.location.street - ); - return this.faker.helpers.fake(format); + return this.faker.helpers.fake(this.faker.definitions.location.street); } /** |
