Skip to content

JosephTLyons/emojis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

70 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

emojis

Package Version Hex Docs

Work with emojis programmatically. ๐ŸŒˆ

gleam add emojis

Usage

import 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.

Development

  • Fetch the data: ./test/emojis/fetch.sh (requires jq and curl)
  • Generate the Gleam code: gleam run -m emojis/generate

Inspiration

The feature set, and some of the design, is inspired by the emojis library for Rust.

About

Work with emojis programmatically. ๐ŸŒˆ

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors