emojindex
This is an emoji index library for the Gleam programming language.
The emojis data was generated from Unicodeβs Full Emoji List v16.0.
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
gleam add emojindex
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: