v3.0.1 ::
- Return
undefined
instead of empty string for invalid inputs for functions like -State.getStateByCodeAndCountry()
,State.getStateByCode()
(to be deprecate soon),Country.getCountryByCode()
- Return empty Array value -
[]
instead of undefined for invalid inputs for functions like -City.getCitiesOfCountry()
,City.getCitiesOfState()
,State.getStatesOfCountry()
v3.0.0 ::
-
Refactoring of complete package to make this package - Tree shakable Fix:60.
-
Change in usage:
-
ES6 Module usage
// Latest version - v3.0.0 import { Country, State, City } from 'country-state-city';
-
AMD Module usage
// Latest version - v3.0.0 let Country = require('country-state-city').Country; let State = require('country-state-city').State; console.log(Country.getAllCountries()) console.log(State.getAllStates())
-
v2.2.0 ::
- State, City Database update by (dr5hn)
v2.1.0 ::
- Fix #53: returns wrong state as state codes can ne duplicate for different countries.
- Deprecate warning:
getStateByCode
- New function -
getStateByCodeAndCountry
v2.0.0 (Backward Incompatible) :: Data Source (dr5hn)
- Not backward compatible with previous versions.
- New and updated API functions.
- Removed proprietor Indexed Id's for uniquely identifying Country, State, City. Instead now using standard isoCodes.
- Data taken from more robust and accurate database.
- Countries with their respective flags, isoCode, currencies, latitude, longitude & timezones.
- States & cities with their latitude & longitude.
v1.0.0 :: Data Source (hiiamrohit)
export = {}
changed toexport default
in index.ts.Interface
typere-exported
fromindex.ts
.Compatible
withES6
module syntax.Compatible
withAMD
module - usingrequire('../index').default
.- Add tests for Interface Re-Exports.
- Test cases for both AMD modules and ES6 modules usage.
- Common Test Cases are being shared between AMD and ES6 modules test files.
v0.1.8 :: Data Source (hiiamrohit)
- Development code - Javascript to Typescript conversion: #12
v0.1.0