Skip to content

Commit

Permalink
feat: upgrading our emoji unicode to ios 15 (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion authored Apr 16, 2024
1 parent ee0e338 commit 1262f7e
Show file tree
Hide file tree
Showing 2 changed files with 407 additions and 19 deletions.
11 changes: 9 additions & 2 deletions bin/regenerate-unicode
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ fetch('https://api.github.com/repos/github/gemoji/contents/db/emoji.json', {

gemoji.forEach(emoji => {
// filter emoji by iOS version https://developer.apple.com/support/app-store/
if (emoji.ios_version <= 12) {
emojis.push([emoji.emoji, emoji.aliases]);
if (emoji.ios_version <= 15) {
// For flag emojis like 🇷🇺 it's in gemoji as `ru` but has a tag for `russia`. Since we want
// folks to be able to type in either for it we should combine the emoji alias with any
// tags that might be present.
if (emoji.category === 'Flags') {
emojis.push([emoji.emoji, Array.from(new Set([...emoji.aliases, ...emoji.tags].filter(Boolean)))]);
} else {
emojis.push([emoji.emoji, emoji.aliases]);
}
}
});

Expand Down
Loading

0 comments on commit 1262f7e

Please sign in to comment.