From a8e896f01bad53ee4eeae66656706d5ad18f97e3 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 10 Jun 2022 01:25:53 +0200 Subject: chore: deprecate cityPrefix and citySuffix (#1041) --- src/modules/address/index.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/modules') 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 ); -- cgit v1.2.3