Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality to return { label: <country.label>, value: <country.value> } and tests with native support #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Gorsargs
Copy link

No description provided.

@Gorsargs
Copy link
Author

Gorsargs commented Jan 26, 2023

getCountryByLabel()
getCountryByValue()
One may want to get a country object of a specific country, these are the methods

Usage
countries.getCountryByLabel('Taiwan, Province of China') // { label: 'Taiwan, Province of China', value: 'TW' }
countries.getCountryByValue('TW') // { label: 'Taiwan, Province of China', value: 'TW' }

Native Usage
countries.native().getCountryByLabel('Taiwan, Province of China') // { label: '臺灣', value: 'TW' }
countries.native().getCountryByValue('TW') // { label: '臺灣', value: 'TW' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant