aboutsummaryrefslogtreecommitdiff
path: root/src/modules/location
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2022-12-23 20:42:23 +0100
committerGitHub <[email protected]>2022-12-23 20:42:23 +0100
commit75a31f620c880413c05f012f1924b2ad89fb950c (patch)
tree4f1c7fdb26d22962f98ae191f6364689193d8155 /src/modules/location
parent4ce8e98fcc19d99bf6df3abb3e24c4667f586076 (diff)
downloadfaker-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.ts10
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);
}
/**