emoji-flag
This is a simple module that takes an ISO 3166-1 alpha-2 country code and returns the regional indicator symbol pair that corresponds to a given emoji flag.
Install
$ npm install emoji-flag
Usage
var flag = var code = 🇦🇺 🇨🇦 'AU' 'CA' 'AU' // and so on…
Example
var flag = var countries = countries AF 🇦🇫 AfghanistanAX 🇦🇽 Åland IslandsAL 🇦🇱 AlbaniaDZ 🇩🇿 AlgeriaAS 🇦🇸 American Samoa
Page weight (browserified)
compression | size |
---|---|
emoji-flag.js | 1.76 kB |
emoji-flag.min.js | 925 B |
emoji-flag.min.js.gz | 502 B |
emoji-flags
module?!
What about the This has a simpler implementation and API. You should use emoji-flags
if you need meta information about a given flag.