iso-3166-standard v1.0.1
ISO-3166 Standard
Provides a directory to the International Organization for Standardization's 3166 standard, including the 3166-2 standard.
ISO-3166 Standard Code Formats
The alpha-2 country code consists of two alphabetic characters.
The alpha-3 country code consists of three alphabetic characters.
The numeric code consists of a positive integer.
United States
alpha-2: US
alpha-3: USA
numeric: 840California
division code: CA
full code: US-CA
For more information, visit the International Organization for Standardization's website here.
Functions
ISO3166.getCountry(countryCode)Accepts an alpha-2, alpha-3, or numeric countryCode. Returns an Object of the country data if found, returns null otherwise.
ISO3166.getSubdivisions(countryCode)Accepts an alpha-2, alpha-3, or numeric countryCode. Returns an Array of the country's subdivisions data if found, returns null otherwise.
ISO3166.getAllCountry()Returns an Array of all countries and their respective data.