Current section
Files
Jump to
Current section
Files
README.md
# emojindex
[](https://hex.pm/packages/emojindex)
[](https://hexdocs.pm/emojindex/)
This is an emoji index library for the [Gleam programming language](https://gleam.run).
The emojis data was generated from [Unicode's Full Emoji List v16.0](https://www.unicode.org/emoji/charts/full-emoji-list.html).
This library give you the ergonomic and convenient when working with emojis:
- By giving you every emoji as a constant with document, you can easily call them and preview the emoji datas on hover/code completion in your IDE.
- This library give you every technical data of any emoji. From name and category group to code points, all from the official Unicode specification.
## Installation
```sh
gleam add emojindex
```
```gleam
import emojindex/emoji as e
import emojindex/emoji_utils
pub fn main() {
e.penguin |> echo
// -> Emoji(
// emoji: "π§",
// name: "penguin",
// group: AnimalsAndNature(AnimalBird),
// code: [0x1F427],
// unicode_version: UnicodeVersion(0, 6),
// )
e.all
|> list.filter(fn(emoji) { emoji.group == e.FoodAndDrink(e.FoodFruit) })
|> list.map(emoji_utils.emoji)
|> echo
// -> [
// "π", "π", "π", "π", "π",
// "πβπ©", "π", "π", "π₯", "π",
// "π", "π", "π", "π", "π",
// "π«", "π₯", "π
", "π«", "π₯₯",
// ]
}
```
Further documentation can be found at <https://hexdocs.pm/emojindex>.
## Credits
Special thanks to:
- [**Full Emoji List**](https://www.unicode.org/emoji/charts/full-emoji-list.html) by [Unicode Consortium](https://home.unicode.org)
- [**Emojis**](https://hexdocs.pm/emojis) by [Joseph T. Lyons](https://github.com/JosephTLyons)