Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
country-flag-emoji
Advanced tools
List of country codes and its flag emojis.
$ npm install country-flag-emoji
# Or if you use Yarn
$ yarn add country-flag-emoji
Use this library directly on the browser:
<!-- For development -->
<script src="https://unpkg.com/country-flag-emoji@latest/dist/country-flag-emoji.umd.js"></script>
<!-- Minified version for production -->
<script src="https://unpkg.com/country-flag-emoji@latest/dist/country-flag-emoji.umd.min.js"></script>
import countryFlagEmoji from "country-flag-emoji";
// All country flag emojis keyed by country code
console.log(countryFlagEmoji.data);
// Array of all country flag emojis
console.log(countryFlagEmoji.list);
// Array of country codes
console.log(countryFlagEmoji.countryCodes);
// Get country flag emoji for the given country code
console.log(countryFlagEmoji.get("US"));
// US: {
// code: "US",
// unicode: "U+1F1FA U+1F1F8",
// name: "United States",
// emoji: "🇺🇸"
// }
data
PropertyGet all country flag emojis keyed by country code.
countryFlagEmoji.data
Data format:
{
//...
ID: {
code: "ID",
unicode: "U+1F1EE U+1F1E9",
name: "Indonesia",
emoji: "🇮🇩"
},
IE: {
code: "IE",
unicode: "U+1F1EE U+1F1EA",
name: "Ireland",
emoji: "🇮🇪"
},
//...
}
list
PropertyGet all country flag emojis.
countryFlagEmoji.list
Data format:
[
//...
{
code: "ID",
unicode: "U+1F1EE U+1F1E9",
name: "Indonesia",
emoji: "🇮🇩"
},
{
code: "IE",
unicode: "U+1F1EE U+1F1EA",
name: "Ireland",
emoji: "🇮🇪"
},
//...
]
countryCodes
PropertyGet all country codes.
countryFlagEmoji.countryCodes
Data format:
[..., "IC", "ID", "IE", ...]
get()
MethodcountryFlagEmoji.get([countryCode])
countryCode
(optional String
): Two-letter country code in ISO 3166-1 alpha-2 format.There are three possible return types:
Array
: If no countryCode
being passed, it returns array of all country flag emojis.undefined
: If the given country code is not found.Object
: If the emoji is found for the given country code. The returned object has 4 properties:
code
: The two-letter country code in ISO 3166-1 alpha-2 format.unicode
: Flag emoji Unicode character sequence, e.g. U+1F1EE U+1F1E9
. Read more about Regional Indicator Symbol.name
: The country name.emoji
: The country flag emoji.MIT © Risan Bagja Pradana
FAQs
List of country codes and its flag emojis
The npm package country-flag-emoji receives a total of 1,149 weekly downloads. As such, country-flag-emoji popularity was classified as popular.
We found that country-flag-emoji demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.