aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2022-06-10 01:25:53 +0200
committerGitHub <[email protected]>2022-06-10 01:25:53 +0200
commita8e896f01bad53ee4eeae66656706d5ad18f97e3 (patch)
treefb0b7f0f301c96f691ae5657deb36c210a0aa9eb /src/modules
parente071c78df7a40813228aeed0ad54f10471289b3f (diff)
downloadfaker-a8e896f01bad53ee4eeae66656706d5ad18f97e3.tar.xz
faker-a8e896f01bad53ee4eeae66656706d5ad18f97e3.zip
chore: deprecate cityPrefix and citySuffix (#1041)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/address/index.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/modules/address/index.ts b/src/modules/address/index.ts
index 311138a5..e3c568fd 100644
--- a/src/modules/address/index.ts
+++ b/src/modules/address/index.ts
@@ -92,10 +92,20 @@ export class Address {
/**
* Returns a random localized city prefix.
*
+ * @see faker.address.city
+ *
* @example
* faker.address.cityPrefix() // 'East'
+ *
+ * @deprecated
*/
cityPrefix(): string {
+ deprecated({
+ deprecated: 'faker.address.cityPrefix()',
+ proposed: "faker.address.city() or faker.fake('{{address.city_prefix}}')",
+ since: 'v7.2',
+ until: 'v8.0',
+ });
return this.faker.helpers.arrayElement(
this.faker.definitions.address.city_prefix
);
@@ -104,10 +114,20 @@ export class Address {
/**
* Returns a random localized city suffix.
*
+ * @see faker.address.city
+ *
* @example
* faker.address.citySuffix() // 'mouth'
+ *
+ * @deprecated
*/
citySuffix(): string {
+ deprecated({
+ deprecated: 'faker.address.citySuffix()',
+ proposed: "faker.address.city() or faker.fake('{{address.city_suffix}}')",
+ since: 'v7.2',
+ until: 'v8.0',
+ });
return this.faker.helpers.arrayElement(
this.faker.definitions.address.city_suffix
);