MCPcopy
hub / github.com/faker-js/faker / city

Method city

src/modules/location/index.ts:290–294  ·  view source on GitHub ↗

* Generates a random localized city name. * * @example * faker.location.city() // 'East Jarretmouth' * fakerDE.location.city() // 'Bad Lilianadorf' * * @since 8.0.0

()

Source from the content-addressed store, hash-verified

288 * @since 8.0.0
289 */
290 city(): string {
291 return this.faker.helpers.fake(
292 this.faker.definitions.location.city_pattern
293 );
294 }
295
296 /**
297 * Generates a random building number.

Callers

nothing calls this directly

Calls 1

fakeMethod · 0.80

Tested by

no test coverage detected