Class: Address

Address

new Address(opts)

Class for generate fake address data.
Parameters:
Name Type Description
opts object Options
Properties
Name Type Attributes Default Description
locale string <optional>
en Current locale

Methods

address()

Get a random full address (include Street number, suffix and name).

city()

Get a random city for current locale.

continent(opts)

Get a random continent name or continent code (code in international format)
Parameters:
Name Type Description
opts object Options
Properties
Name Type Attributes Default Description
code boolean <optional>
false If true returns code.

coordinates()

Generate random geo coordinates.

country()

Get a random country.

countryISO(opts)

Get a random ISO code of country.
Parameters:
Name Type Description
opts object Options
Properties
Name Type Attributes Default Description
format boolean <optional>
iso2 Format of code (iso2, iso3, numeric).

latitude()

Generate a random value of latitude (-90 to +90).

longitude()

Generate a random value of longitude (-180 to +180).

state(opts)

Get a random states or subject of country.
Parameters:
Name Type Description
opts object Options
Properties
Name Type Attributes Default Description
abbr <optional>
false If True then return ISO (ISO 3166-2) code of state/region/province/subject.

streetName()

Get a random street name.

streetNumber()

Generate a random street number.

streetSuffix()

Get a random street suffix.