How to use country-code-emoji - 3 common examples

To help you get started, we’ve selected a few country-code-emoji examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github philsturgeon / awesome-earth / src / countries.js View on Github external
fromAlpha2Code: code => {
    return {
      name: countries.getName(code, 'en'),
      emoji: flag(code),
    };
  },
};
github philsturgeon / awesome-earth / src / pages / select-your-country.jsx View on Github external
.map(countryCode => {
                  const countryHasContent = countriesWithContent.includes(
                    countryCode
                  );
                  const countryFlag = flag(countryCode);
                  const countryName = countries[countryCode];

                  if (!countryHasContent) {
                    return (
                      <div>
                        {countryFlag} {countryName}
                        <div>
                          <small>
                            We don't have any content for {countryName}, yet.
                            Why not{' '}
                            </small></div></div>
github philsturgeon / awesome-earth / src / pages / select-your-country.jsx View on Github external
{({ country, setCountry, clearCountry }) =&gt; (
          <div>
            <div>
              <h1>Select Your Country</h1>
              <input placeholder="Filter Countries" type="text"> setSearchTerm(e.target.value.toLowerCase())}
              /&gt;
            </div>
            <div>
              {country.name !== null ? (
                <div>
                  <small>Currently selected</small>
                  <div>
                    {flag(country.code)} {country.name}
                  </div>
                  <a href="#"> {
                      e.preventDefault();
                      clearCountry();
                      navigate('/');
                    }}
                  &gt;
                    Remove
                  </a>
                </div>
              ) : null}
              {Object.keys(countries)
                .filter(countryCode =&gt;
                  countries[countryCode].toLowerCase().includes(searchTerm)</div></div>

country-code-emoji

convert country codes (ISO 3166-1 alpha-2) to corresponding emoji flags (unicode regional indicator symbols)

MIT
Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis

Popular country-code-emoji functions