flag_emoji v0.1.0
flag_emoji
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
-
Add the dependency to your
shard.yml:dependencies: flag_emoji: github: mamantoha/flag_emoji -
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
- Fork it (https://github.com/mamantoha/flag_emoji/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Anton Maminov - creator and maintainer
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