Skip to content

Migrating from 1.x.x to 2.0.0

Matt edited this page Apr 6, 2017 · 2 revisions

Countries lists

All the lists were renamed:

  • countries -> COUNTRIES_LIST
  • countriesWithoutZip -> COUNTRIES_WITHOUT_ZIP_LIST
  • countriesWithState -> COUNTRIES_WITH_STATES_LIST

Two new keys were added to COUNTRIES_LIST: ISO-3 and ISO-Numeric

Countries properties

The method countryIsoToValue was deprecated, you should use getCountry instead. getCountry returns the full country object.

With version 1.x.x

countryIsoToValue('US'); // 'United States'

With version 2.0.0

getCountry('US'); // {name: "United States", iso2: "US", iso3: "USA", isoNumeric: "840"}
getCountry('US').name; // 'United States'
Clone this wiki locally