Work with emojis programmatically. ๐
gleam add emojisimport emojis.{Flags}
import gleam/list
import gleeunit/should
pub fn main() {
let assert Ok(rocket) = emojis.get_by_alias("rocket")
rocket.emoji |> should.equal("๐")
emojis.all()
|> list.filter(fn(emoji) { emoji.category == Flags })
|> list.map(fn(emoji) { emoji.emoji })
|> list.take(10)
|> should.equal(["๐ฆ๐จ", "๐ฆ๐ฉ", "๐ฆ๐ช", "๐ฆ๐ซ", "๐ฆ๐ฌ", "๐ฆ๐ฎ", "๐ฆ๐ฑ", "๐ฆ๐ฒ", "๐ฆ๐ด", "๐ฆ๐ถ"])
}Further documentation can be found at https://hexdocs.pm/emojis.
- Fetch the data:
./test/emojis/fetch.sh(requiresjqandcurl) - Generate the Gleam code:
gleam run -m emojis/generate
The feature set, and some of the design, is inspired by the
emojis library for Rust.