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

Method buildingNumber

src/modules/location/index.ts:304–313  ·  view source on GitHub ↗

* Generates a random building number. * * @example * faker.location.buildingNumber() // '379' * * @since 8.0.0

()

Source from the content-addressed store, hash-verified

302 * @since 8.0.0
303 */
304 buildingNumber(): string {
305 return this.faker.helpers
306 .arrayElement(this.faker.definitions.location.building_number)
307 .replaceAll(/#+/g, (m) =>
308 this.faker.string.numeric({
309 length: m.length,
310 allowLeadingZeros: false,
311 })
312 );
313 }
314
315 /**
316 * Generates a random localized street name.

Callers 1

location.spec.tsFile · 0.80

Calls 2

arrayElementMethod · 0.80
numericMethod · 0.80

Tested by

no test coverage detected