@jukben/emoji-search

Retrieve emojis based on the search term.

Stats

StarsIssuesVersionUpdatedCreatedSize
@jukben/emoji-search
542.0.12 years ago4 years agoMinified + gzip package size for @jukben/emoji-search in KB

Readme

@jukben/emoji-search

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.

Install

npm i --save-dev @jukben/emoji-search

Usage

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 // 🍺

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.