aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2022-12-02 22:11:49 +0700
committerGitHub <[email protected]>2022-12-02 16:11:49 +0100
commit5e51335e19426820874c75678ee5a7ebd332a911 (patch)
tree746b907feb53e3bd6efbaa87551abf2762e4539a /src/modules
parent0cec57153d9e97b609714e8d6a96e2ccfcedfc11 (diff)
downloadfaker-5e51335e19426820874c75678ee5a7ebd332a911.tar.xz
faker-5e51335e19426820874c75678ee5a7ebd332a911.zip
docs(location): clarify city and cityName methods (#1621)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/location/index.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts
index a4e6ef9e..a4238241 100644
--- a/src/modules/location/index.ts
+++ b/src/modules/location/index.ts
@@ -66,10 +66,11 @@ export class LocationModule {
}
/**
- * Generates a random localized city name.
+ * Generates a random fictional city name for the locale.
*
* @example
* faker.location.city() // 'East Jarretmouth'
+ * faker.locale = 'de'; faker.location.city() // 'Bad Lilianadorf'
*
* @since 8.0.0
*/
@@ -81,10 +82,11 @@ export class LocationModule {
}
/**
- * Returns a random localized and existing city name.
+ * Returns a random city name from a list of real cities for the locale.
*
* @example
* faker.location.cityName() // 'San Rafael'
+ * faker.locale = 'de'; faker.location.cityName() // 'Nürnberg'
*
* @since 8.0.0
*/