Generators
location
Addresses, cities, subdivisions, postcodes, coordinates, countries.
var faker = Faker(seed: 1337, locale: DecoyLocaleEN.locale)faker.location.buildingNumber()| Method | Example output |
|---|---|
buildingNumber() |
16258172 |
streetSuffix() |
LockPrairieFort |
streetName() |
Rice SkywayJane WayDonald Estate |
streetAddress(full: Bool = false) |
537 Richard Crest21544 Budnick Expressway47 Sara Green |
secondaryAddress() |
Apt. 111Flat 9Apt. 631 |
city() |
ParklaneChoteauTalladega |
place() |
["city": "Old Saybrook", "state": "Connecticut", "state_code": "CT"]["city": "Washington Terrace", "state": "Utah", "state_code": "UT"]["city": "Colonie", "state": "New York", "state_code": "NY"] |
placeAndPostcode() |
(city: "First Mesa", state: "Arizona", stateCode: "AZ", postcode: "85537")(city: "Richmond West", state: "Florida", stateCode: "FL", postcode: "34632")(city: "Seneca", state: "Missouri", stateCode: "MO", postcode: "65088") |
county() |
Leflore CountySaratoga CountyCampbell County |
stateRow() |
["abbr": "IN", "name": "Indiana"]["abbr": "AR", "name": "Arkansas"]["abbr": "MD", "name": "Maryland"] |
state() |
MichiganMaineSouth Dakota |
stateAbbreviation() |
PANDMA |
country() |
UzbekistanAnguillaPortugal |
continent() |
OceaniaAfricaEurope |
timeZone() |
Africa/TripoliAsia/TehranAmerica/Hermosillo |
postcode() |
081224798670561 |
postcode(state abbreviation: String?) |
081224798670561 |
stateAndPostcode() |
(state: "Oregon", abbr: "OR", postcode: "97689")(state: "Illinois", abbr: "IL", postcode: "61925")(state: "Wisconsin", abbr: "WI", postcode: "54802") |
postalAddress() |
Annie Webb 532 Burns Rapid Olla Texas 91031Paul Garcia 15 Haines Crest Fair Oaks Ranch Idaho 83874Logan Ross 54670 Vanessa Lodge Westchase Colorado 97010 |
countryCode() |
["alpha2": "CH", "alpha3": "CHE", "numeric": "756"]["alpha2": "KG", "alpha3": "KGZ", "numeric": "417"]["alpha2": "KZ", "alpha3": "KAZ", "numeric": "398"] |
countryCodeAlpha2() |
LIGQAZ |
countryCodeAlpha3() |
SGSDNKATA |
language() |
["alpha2": "es", "alpha3": "spa", "name": "Spanish"]["alpha2": "bn", "alpha3": "ben", "name": "Bangla"]["alpha2": "tk", "alpha3": "tuk", "name": "Turkmen"] |
direction(abbreviated: Bool = false) |
NorthSoutheastNorthwest |
cardinalDirection(abbreviated: Bool = false) |
NorthSouthEast |
ordinalDirection(abbreviated: Bool = false) |
NortheastSoutheastSouthwest |
latitude() |
40.24429.663384.0251 |
longitude() |
3.2718128.548-131.0444 |
coordinate(near origin: (latitude: Double, longitude: Double)? = nil, radiusKm: Double = 10) |
(latitude: 67.3302, longitude: 16.9603)(latitude: 83.9858, longitude: -152.6476)(latitude: -60.516, longitude: -85.948) |
Examples are real output from three different seeds, captured when this page was built, using each method’s default arguments. Where a signature shows parameters, pass your own to change the size, gender, length or format.