Exposes search function which returns arrays of related emojis:
type Emoji = {
category: string
char: string,
fitzpatrick_scale: boolean
keywords: Array<string>,
name: string,
}
(string) => Array<Emoji>
Based on emojilib and wonderful match-sorter.
npm i --save-dev @jukben/emoji-search
import search from "@jukben/emoji-search"
search("beer") // [{"keywords":["beer", "relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],"char":"๐บ","fitzpatrick_scale":false,"category":"food_and_drink", name: "beer"},{"keywords":["beers", "relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],"char":"๐ป","fitzpatrick_scale":false,"category":"food_and_drink", name: beers"},{"keywords":["milk_glass", "beverage","drink","cow"],"char":"๐ฅ","fitzpatrick_scale":false,"category":"food_and_drink", name: "milk_glass"},...
search("beer")[0].char // ๐บ
MIT