close #2 : added autocomplete for display name & replace fusejs

This commit is contained in:
unknown 2021-08-24 15:31:20 +05:30
parent c81628a66e
commit eb667bc436
6 changed files with 183 additions and 151 deletions

View file

@ -53,11 +53,15 @@ function addToGroup(emoji) {
const emojis = [];
emojisData.forEach((emoji) => {
const em = { ...emoji, shortcodes: shortcodes[emoji.hexcode] };
const myShortCodes = shortcodes[emoji.hexcode];
const em = {
...emoji,
shortcode: Array.isArray(myShortCodes) ? myShortCodes[0] : myShortCodes,
shortcodes: myShortCodes,
};
addToGroup(em);
emojis.push(em);
});
function searchEmoji(term) {
const options = {
includeScore: true,