diff options
| author | DivisionByZero <[email protected]> | 2023-04-21 18:45:52 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-21 16:45:52 +0000 |
| commit | 9161a069d06d17f62b6b6d904251fd2102299064 (patch) | |
| tree | 2491e770bcc07b109b4109a9bf87794f96eaa138 /src/modules | |
| parent | 2a6f578149aebdb5c375378a778383249e9819f3 (diff) | |
| download | faker-9161a069d06d17f62b6b6d904251fd2102299064.tar.xz faker-9161a069d06d17f62b6b6d904251fd2102299064.zip | |
refactor(location): deprecate cityName (#2070)
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/location/index.ts | 10 | ||||
| -rw-r--r-- | src/modules/random/index.ts | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts index 76b3e100..97423b83 100644 --- a/src/modules/location/index.ts +++ b/src/modules/location/index.ts @@ -156,13 +156,23 @@ export class LocationModule { /** * Returns a random city name from a list of real cities for the locale. * + * @see faker.location.city() + * * @example * faker.location.cityName() // 'San Rafael' * fakerDE.location.cityName() // 'Nürnberg' * * @since 8.0.0 + * + * @deprecated Use `faker.location.city()` instead. */ cityName(): string { + deprecated({ + deprecated: 'faker.location.cityName', + proposed: 'faker.location.city', + since: '8.0', + until: '9.0', + }); return this.faker.helpers.arrayElement( this.faker.definitions.location.city_name ); diff --git a/src/modules/random/index.ts b/src/modules/random/index.ts index 03f126f8..d0544119 100644 --- a/src/modules/random/index.ts +++ b/src/modules/random/index.ts @@ -53,7 +53,6 @@ export class RandomModule { const wordMethods = [ () => this.faker.location.cardinalDirection(), - this.faker.location.cityName, this.faker.location.country, this.faker.location.county, () => this.faker.location.direction(), |
