Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jukben/emoji-search

🔍️ Retrieve emojis based on the search term
https://github.com/jukben/emoji-search

emoji emoji-search search

Last synced: about 2 months ago
JSON representation

🔍️ Retrieve emojis based on the search term

Awesome Lists containing this project

README

        

# @jukben/emoji-search

Exposes search function which returns arrays of related emojis:

```javascript
type Emoji = {
category: string
char: string,
fitzpatrick_scale: boolean
keywords: Array,
name: string,
}

(string) => Array
```

Based on [emojilib](https://github.com/muan/emojilib) and wonderful [match-sorter](https://github.com/kentcdodds/match-sorter).

## Install

`npm i --save-dev @jukben/emoji-search`
## Usage

```javascript
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