- Find Country, param - iso2 code, iso3 code ...
CountryAtlas.getCountries
- Get all countriesCountryAtlas.find('iso2', 'US')
- Find country by iso2 codeCountryAtlas.find('iso3', 'USA')
- Find country by iso3 codeCountryAtlas.getCountries([..properties])
- Get all countries selecting the properties- Method Chaining
CountryAtlas.find('iso2', 'US').name
- Find country by iso2 code and get nameCountryAtlas.find('iso2', 'US').capital
- Find country by iso2 code and get capital
CountryAtlas.find('iso2', 'US').currency
- Find country by iso2 code and get currency
- Find State, get state, param - state code
CountryAtlas.states('US')
- Get all states of countryCountryAtlas.state('US', 'NY')
- Get state by state_code as param- Method Chaining
CountryAtlas.state('US', 'NY').name
- Get state by state_code as param and get nameCountryAtlas.state('US', 'NY').latitude
- Get state by state_code as param and get latitudeCountryAtlas.state('US', 'NY').longitude
- Get state by state_code as param and get longitudeCountryAtlas.state('US', 'NY').cities
- Get all cities of state
These is use to get the iso2, iso3, currency name, symbol, etc.
-
CountryAtlas.getCurrencies()
- Get all currencies, but it will be using the CountryAtlas.getCountries([..properties]) method
-
CountryAtlas.getCurrencies()
- Get all currencies- Note - Flags will be added to the currencies
-
CountryAtlas.currency('US')
- Get currency by iso2 code => {currency: 'usd', currency_symbol: '$'} -
CountryAtlas.getCountriesWithCurrency('USD')
- Get countries with currency =>[{ iso2: 'US', iso3: 'USA', currency: 'usd', currency_symbol: '$' }]
-
CountryAtlas.getCountriesWithCurrency('USD', ['iso2', 'iso3'])
- Get countries with currency and select properties =>[{ iso2: 'US', iso3: 'USA' }]
-
CountryAtlas.getTimezones()
- Get all timezones -
CountryAtlas.timezone('US')
- Get timezones by iso2 code
-
CountryAtlas.getFlags()
- Get all flags -
CountryAtlas.getFlag('US')
- Get flag by iso2 code => Returns SVG
-
CountryAtlas.getCallingCodes()
- Get all calling codes- Note - Flags will be added to the calling codes
-
CountryAtlas.callingCode('US')
- Get calling code by iso2 code
-
CountryAtlas.isValidIso2('US')
- Validate iso2 code -
CountryAtlas.isValidIso3('USA')
- Validate iso3 code -
CountryAtlas.isValidCurrency('USD')
- Validate currency code -
CountryAtlas.isValidTimezone('America/New_York')
- Validate timezone code -
CountryAtlas.isValidCallingCode('1')
- Validate calling code -
CountryAtlas.isValidStateCode('NY')
- Validate state code -
CountryAtlas.isValidStateName('New York')
- Validate state name
Note - All the above methods will return true
or false
More methods will be added soon