Methods
-
<static> cardinalDirection(useAbbr)
-
cardinal direction
Parameters:
Name Type Description useAbbrBoolean return direction abbreviation. defaults to false
-
<static> cardinalDirection(useAbbr)
-
cardinal direction
Parameters:
Name Type Description useAbbrBoolean return direction abbreviation. defaults to false
-
<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}}{{address.cityName}}when city name is available
Parameters:
Name Type Description formatString -
<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}}{{address.cityName}}when city name is available
Parameters:
Name Type Description formatString -
<static> cityName()
-
Returns a random city name
-
<static> cityName()
-
Returns a random city name
-
<static> cityPrefix()
-
Return a random localized city prefix
-
<static> cityPrefix()
-
Return a random localized city prefix
-
<static> citySuffix()
-
Return a random localized city suffix
-
<static> citySuffix()
-
Return a random localized city suffix
-
<static> country()
-
country
-
<static> country()
-
country
-
<static> countryCode(alphaCode)
-
countryCode
Parameters:
Name Type Description alphaCodestring default alpha-2
-
<static> countryCode(alphaCode)
-
countryCode
Parameters:
Name Type Description alphaCodestring default alpha-2
-
<static> county()
-
county
-
<static> county()
-
county
-
<static> direction(useAbbr)
-
direction
Parameters:
Name Type Description useAbbrBoolean return direction abbreviation. defaults to false
-
<static> direction(useAbbr)
-
direction
Parameters:
Name Type Description useAbbrBoolean return direction abbreviation. defaults to false
-
<static> latitude(max, min, precision)
-
latitude
Parameters:
Name Type Description maxDouble default is 90
minDouble default is -90
precisionnumber default is 4
-
<static> latitude(max, min, precision)
-
latitude
Parameters:
Name Type Description maxDouble default is 90
minDouble default is -90
precisionnumber default is 4
-
<static> longitude(max, min, precision)
-
longitude
Parameters:
Name Type Description maxDouble default is 180
minDouble default is -180
precisionnumber default is 4
-
<static> longitude(max, min, precision)
-
longitude
Parameters:
Name Type Description maxDouble default is 180
minDouble default is -180
precisionnumber default is 4
-
<static> ordinalDirection(useAbbr)
-
ordinal direction
Parameters:
Name Type Description useAbbrBoolean return direction abbreviation. defaults to false
-
<static> ordinalDirection(useAbbr)
-
ordinal direction
Parameters:
Name Type Description useAbbrBoolean return direction abbreviation. defaults to false
-
<static> secondaryAddress()
-
secondaryAddress
-
<static> secondaryAddress()
-
secondaryAddress
-
<static> state(useAbbr)
-
state
Parameters:
Name Type Description useAbbrBoolean -
<static> state(useAbbr)
-
state
Parameters:
Name Type Description useAbbrBoolean -
<static> stateAbbr()
-
stateAbbr
-
<static> stateAbbr()
-
stateAbbr
-
<static> streetAddress(useFullAddress)
-
Returns a random localized street address
Parameters:
Name Type Description useFullAddressBoolean -
<static> streetAddress(useFullAddress)
-
Returns a random localized street address
Parameters:
Name Type Description useFullAddressBoolean -
<static> streetName()
-
Returns a random localized street name
-
<static> streetName()
-
Returns a random localized street name
-
<static> streetPrefix()
-
streetPrefix
-
<static> streetPrefix()
-
streetPrefix
-
<static> streetSuffix()
-
streetSuffix
-
<static> streetSuffix()
-
streetSuffix
-
<static> timeZone()
-
Return a random time zone
-
<static> timeZone()
-
Return a random time zone
-
<static> zipCode(format)
-
Generates random zipcode from format. If format is not specified, the locale's zip format is used.
Parameters:
Name Type Description formatString -
<static> zipCode(format)
-
Generates random zipcode from format. If format is not specified, the locale's zip format is used.
Parameters:
Name Type Description formatString -
<static> zipCodeByState(state)
-
Generates random zipcode from state abbreviation. If state abbreviation is not specified, a random zip code is generated according to the locale's zip format. Only works for locales with postcode_by_state definition. If a locale does not have a postcode_by_state definition, a random zip code is generated according to the locale's zip format.
Parameters:
Name Type Description stateString -
<static> zipCodeByState(state)
-
Generates random zipcode from state abbreviation. If state abbreviation is not specified, a random zip code is generated according to the locale's zip format. Only works for locales with postcode_by_state definition. If a locale does not have a postcode_by_state definition, a random zip code is generated according to the locale's zip format.
Parameters:
Name Type Description stateString