country-emoji
Converts between country names, ISO 3166-1 codes and flag emojis. Has zero dependencies.
Install
$ npm install --save country-emoji
Usage
const {flag, code, name, countries} = require('country-emoji');
flag('CL')
code('🇨🇦')
name('🇶🇦')
flag('Taiwan number one!')
flag('Congo and Burma')
flag('Republic of Tanzania')
flag('Tanzania, United Republic of')
code('Australia')
code('UAE')
name('AE')
code('UK')
flag(name(flag(code(flag(name('NZ'))))))
Object.keys(countries).join(", ")
Don't want JS?
Check out the following:
PS. Happy to add more here :).
Bugs and feedback
If you discover a bug please report it here. Express gratitude here.
Mail me at bugs@meedamian.com, or on twitter @meeDamian.
License
MIT @ Damian Mee