Namespace: address

faker. address

Methods


<static> city(format)

Generates a random localized city name. The format string can contain any method provided by faker wrapped in {{}}, e.g. {{name.firstName}} in order to build the city name.

If no format string is provided one of the following is randomly used:

  • {{address.cityPrefix}} {{name.firstName}}{{address.citySuffix}}
  • {{address.cityPrefix}} {{name.firstName}}
  • {{name.firstName}}{{address.citySuffix}}
  • {{name.lastName}}{{address.citySuffix}}
Parameters:
Name Type Description
format String

<static> cityPrefix()

Return a random localized city prefix


<static> citySuffix()

Return a random localized city suffix


<static> country()

country


<static> countryCode()

countryCode


<static> county()

county


<static> latitude()

latitude


<static> longitude()

longitude


<static> secondaryAddress()

secondaryAddress


<static> state(useAbbr)

state

Parameters:
Name Type Description
useAbbr Boolean

<static> stateAbbr()

stateAbbr


<static> streetAddress(useFullAddress)

Returns a random localized street address

Parameters:
Name Type Description
useFullAddress Boolean

<static> streetName()

Returns a random localized street name


<static> streetPrefix()

streetPrefix


<static> streetSuffix()

streetSuffix


<static> zipCode(format)

Generates random zipcode from format. If format is not specified, the locale's zip format is used.

Parameters:
Name Type Description
format String