Reactions: skin tone support

This commit is contained in:
Sidney Keese 2020-10-02 13:05:09 -07:00 committed by Josh Perez
parent 6a7d45b6fc
commit c3ddedfde1
13 changed files with 307 additions and 141 deletions

View file

@ -263,9 +263,21 @@ export function convertShortName(
}
export function emojiToImage(emoji: string): string | undefined {
if (!Object.prototype.hasOwnProperty.call(imageByEmoji, emoji)) {
return undefined;
}
return imageByEmoji[emoji];
}
export function emojiToData(emoji: string): EmojiData | undefined {
if (!Object.prototype.hasOwnProperty.call(dataByEmoji, emoji)) {
return undefined;
}
return dataByEmoji[emoji];
}
function getCountOfAllMatches(str: string, regex: RegExp) {
let match = regex.exec(str);
let count = 0;