element.version === currentVersion)) { versionNodes.unshift({ version: currentVersion, url: "#" }); } document.querySelector("#project-version").innerHTML = versionNodes.reduce( (acc, element) => { const status = currentVersion === element.version ? "selected disabled" : ""; return ` ${acc} `; }, `
emojindex Β· v4.0.0

emojindex

Package Version Hex Docs

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 CLDR short name to category group and even Unicode version, all from the official Unicode specification.

Installation

gleam add emojindex
import emojindex/emoji
import emojindex/emojindex as e

pub fn main() {
  e.penguin |> echo
  // -> Emoji(
  //   emoji: "🐧",
  //   name: "penguin",
  //   group: AnimalsAndNature(AnimalBird),
  //   unicode_version: UnicodeVersion(0, 6),
  // )

  emoji.all
    |> list.filter(fn(emoji) {
      emoji |> emoji.group() == emoji.FoodAndDrink(emoji.FoodFruit)
    })
    |> list.map(emoji.to_string)
    |> echo
  // -> [
  //   "πŸ‡", "🍈", "πŸ‰", "🍊", "πŸ‹",
  //   "πŸ‹β€πŸŸ©", "🍌", "🍍", "πŸ₯­", "🍎",
  //   "🍏", "🍐", "πŸ‘", "πŸ’", "πŸ“",
  //   "🫐", "πŸ₯", "πŸ…", "πŸ«’", "πŸ₯₯",
  // ]

  e.rainbow_flag
    |> emoji.to_string()
    |> string.to_utf_codepoints()
    |> list.map(string.utf_codepoint_to_int)
    |> list.map(int.to_base16)
    |> string.join("-")
  // -> "1F3F3-FE0F-200D-1F308"
}

Further documentation can be found at https://hexdocs.pm/emojindex.

Credits

Special thanks to:

✨ Search Document