emoji-datasource
February 26, 2026 ยท View on GitHub
Ruby gem for emoji-datasource from NPM package https://github.com/iamcal/emoji-data
Installation
Add this line to your application's Gemfile:
gem 'emoji-datasource'
Usage
Return all emoji data
EmojiDatasource.data
Find emoji by short name
EmojiDatasource.find_by_short_name('+1')
#=> EmojiDatasource::Emoji: :+1: (๐)
Find emoji by raw string:
EmojiDatasource.find_by_char('๐๐พ')
#=> EmojiDatasource::Emoji: :+1::skin-tone-5: (๐๐พ)
Find emoji by unicode hex character code:
EmojiDatasource.find_by_unified("1F469-200D-2764-FE0F-200D-1F468")
#=> EmojiDatasource::Emoji: :woman-heart-man: (๐ฉโโค๏ธโ๐จ)
Convert emoji short name to character
EmojiDatasource.short_name_to_char('+1') # => ๐
this also supports skin variations
EmojiDatasource.short_name_to_char('+1::skin-tone-2') # => ๐๐ป
Get base emoji for skin variation:
emoji = EmojiDatasource.find_by_short_name(':+1::skin-tone-5:')
#=> EmojiDatasource::Emoji: :+1::skin-tone-5: (๐๐พ)
emoji.base
#=> EmojiDatasource::Emoji: :+1: (๐)
Supported Ruby Versions
This library aims to support and is tested against the following Ruby implementations:
- Ruby 2.7.0
- Ruby 3.0.0
- Ruby 3.1.0
- Ruby 3.2.0
- Ruby 3.3.0
- Ruby 3.4.0
- Ruby 4.0.0
License
The gem is available as open source under the terms of the MIT License.