Skip to content

v2.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@meeDamian meeDamian released this 04 Sep 18:42
· 5 commits to master since this release
v2.0.0-beta.1
a7d725f

What's Changed

Breaking (potentially)

  • Turkey changed its name to Türkiye, and library now reflects that. Turkey is still recognised.

     // v1.5.6
     name('TR') // => Turkey
     name('🇹🇷') // => Turkey
    
     // v2.0.0
     name('TR') // => Türkiye
     name('🇹🇷') // => Türkiye
    
     // Both: v1.5.6, v2.0.0
     code('Turkey') // => TR
     flag('Turkey') // => 🇹🇷
  • More input might match now, ex.

     // v1.5.6
     flag('Turks and Caicos') // => 🇹🇨
     flag('Turks & Caicos')   // => undefined
    
     // v2.0.0
     flag('Turks and Caicos') // => 🇹🇨
     flag('Turks & Caicos')   // => 🇹🇨

Added

  • Add support of Dutch and French overseas territories, and South Sudan by @rverbytskyi in #26
  • v2.0.0 by @meeDamian in #50
  • Add 'US' as an alternative name for the US by @alpn in #43
  • Support for additional country names and abbreviations, such as "Eswatini" (previously known as Swaziland), "Côte d'Ivoire", and others
  • Support for country names with weird punctuation or characters

Changed

  • Improved normalization of country names, handling cases like "Trinidad & Tobago" and "Virgin Islands, British"
  • Still no dependencies, but all dev-dependencies updated to newest verions

Fixed

  • Resolved issues with name conflicts, such as "Korea" or "United"
  • Improved handling of edge cases, such as when multiple country names are present in a single string

Removed

  • Removed support for the deprecated "Netherlands Antilles" country code

New Contributors

Full Changelog: v1.5.6...v2.0.0-beta.1