- Fixed
KG
(Kyrgyzstan) - Changes
Saint Barthelemy
to official nameSaint Barthélemy
- Added
XK
(Republic of Kosovo) - Added
BN
(Brunei Darussalam)
- Minor internal updates
- Moved to esbuild minifier
- pnpm linked dependencies
- dropped const enum
Country
export - Updated docs
Improved type support and provided error handling for when invalid or incorrect ISO codes are provided.
- Added literal union support for argument
code
- Added type support for country name reference of return
- Added error support when an unmatched ISO is provided
- Appended "(DPRK)" to "North Korea" country name.
- Added const enum
Country
export which uses Country Names to map ISO codes - Exposed ISO code Union type to export
- Added
CountryCodes
type export
Replaced development rollup dependencies to use @brixtol/rollup-config
Extend prettier config in package.json
file and align readme.
Mostly development space adjustments, no code was modified, aside from the eslint formats that were applied to source. In addition, the module also exposes the mapping object on the exports.
- Expose the object mapping on export, available on
Countries
- Improved and aligned rollup build config
- Added @brixtol/eslint-config to development dependencies.
- Added @brixtol/prettier-config to development dependencies.
Dropped support of default exports. This module uses named exports. The module typings now export an identical interface of countries.
import { getCountryName } from '@brixtol/country-names';
const country = getCountryName('SE'); // Sweden
- No longer support default exports, project now uses named export approach.
- Provided interface of country mappings, available on
ICountries
- Initial Release