aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2023-03-29 16:21:02 +0700
committerGitHub <[email protected]>2023-03-29 09:21:02 +0000
commit2c9e0b8cfa2fea4f861be019ad23d11ff36613cf (patch)
tree75b98504a5cb33bc4441df957d28b3c57598c8af
parentbbf65d89a46be9f70c1ae250d62140044404dbcc (diff)
downloadfaker-2c9e0b8cfa2fea4f861be019ad23d11ff36613cf.tar.xz
faker-2c9e0b8cfa2fea4f861be019ad23d11ff36613cf.zip
docs(location): improve documentation for state and county (#1987)
-rw-r--r--src/definitions/location.ts6
-rw-r--r--src/modules/location/index.ts10
2 files changed, 9 insertions, 7 deletions
diff --git a/src/definitions/location.ts b/src/definitions/location.ts
index c0f6dfa9..6987327d 100644
--- a/src/definitions/location.ts
+++ b/src/definitions/location.ts
@@ -45,17 +45,17 @@ export type LocationDefinitions = LocaleEntry<{
country_code: Array<{ alpha2: string; alpha3: string }>;
/**
- * The names of this country's states.
+ * The names of this country's states, or other first-level administrative areas.
*/
state: string[];
/**
- * The abbreviated names of this country's states.
+ * The abbreviated names of this country's states, or other first-level administrative areas.
*/
state_abbr: string[];
/**
- * The names of counties inside the country or state.
+ * The names of counties, or other second-level administrative areas, inside the country's states.
*/
county: string[];
diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts
index fb902588..37d8f14f 100644
--- a/src/modules/location/index.ts
+++ b/src/modules/location/index.ts
@@ -228,10 +228,10 @@ export class LocationModule {
}
/**
- * Returns a random localized county.
+ * Returns a random localized county, or other equivalent second-level administrative entity for the locale's country such as a district or department.
*
* @example
- * faker.location.county() // 'Cambridgeshire'
+ * fakerEN_GB.location.county() // 'Cambridgeshire'
*
* @since 8.0.0
*/
@@ -297,10 +297,12 @@ export class LocationModule {
}
/**
- * Returns a random localized state from this country.
+ * Returns a random localized state, or other equivalent first-level administrative entity for the locale's country such as a province or region.
*
* @example
- * faker.location.state() // 'Georgia'
+ * faker.location.state() // 'Mississippi'
+ * fakerEN_CA.location.state() // 'Saskatchewan'
+ * fakerDE.location.state() // 'Nordrhein-Westfalen'
*
* @since 8.0.0
*/