Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(location): clarify city and cityName methods #1621

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/modules/location/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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'
matthewmayer marked this conversation as resolved.
Show resolved Hide resolved
*
* @since 8.0.0
*/
Expand Down