flag_emoji v0.1.0

A tiny Crystal library that converts a two-letter ISO 3166-1 alpha-2 country code into its corresponding emoji flag

flag_emoji

Crystal CI GitHub release License

A tiny Crystal library that converts a two-letter ISO 3166-1 alpha-2 country code into its corresponding emoji flag. It provides a simple, zero-dependency API for turning codes like "US" or "jp" into πŸ‡ΊπŸ‡Έ and πŸ‡―πŸ‡΅.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      flag_emoji:
        github: mamantoha/flag_emoji
    
  2. Run shards install

Usage

require "flag_emoji"

FlagEmoji.from_country_code("US") # => "πŸ‡ΊπŸ‡Έ"
FlagEmoji.from_country_code("GB") # => "πŸ‡¬πŸ‡§"
FlagEmoji.from_country_code("JP") # => "πŸ‡―πŸ‡΅"
FlagEmoji.from_country_code("fr") # => "πŸ‡«πŸ‡·"

Contributing

  1. Fork it (https://github.com/mamantoha/flag_emoji/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

flag_emoji

Owner
Statistic
  • 0
  • 0
  • 0
  • 2
  • 0
  • 4 days ago
  • October 24, 2025
License

MIT License

Links
Synced at

Tue, 28 Oct 2025 14:27:35 GMT

Languages