package emoji

  1. Overview
  2. Docs
Use emojis by name

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v3.0.1.tar.gz
md5=5e27588e5ca24d338e629ee89160bf15
sha512=be0edf6c62a8b76c7c160de91731e90863eea883396ed8faf71a88014f3bf1a600a8314f4772bb8332d45fa2eea1478bd5cf7e9d30b86b2268abbf6c8266547a

doc/README.html

Emoji

OCaml library providing byte sequences of all the Unicode (v17.0) emoji characters and sequences

$ opam install emoji

You can see them by printing to the screen:

# Emoji.distorted_face;;
- : string = "๐Ÿซช"
# Emoji.hairy_creature;;
- : string = "๐Ÿซˆ"
# Emoji.orca;;
- : string = "๐Ÿซ"

You can also get all emojis from the same category or subcategory:

# let best_animals = Emoji.sub_category_animal_reptile;;
val best_animals : string array =
  [|"๐ŸŠ"; "๐Ÿ‰"; "๐Ÿฒ"; "๐ŸฆŽ"; "๐Ÿฆ•"; "๐Ÿ"; "๐Ÿฆ–"; "๐Ÿข"|]

Using ocp-browser shows the emoji

ocp-browser screenshot

Development

To generate emoji.ml, first update the source html files:

$ wget "https://www.unicode.org/emoji/charts/full-emoji-list.html"
$ wget "https://www.unicode.org/emoji/charts/full-emoji-modifiers.html"

then run:

$ dune exec gencode/gencode.exe > src/emoji.ml

test with dune runtest, you can then dune promote to apply mdx changes to keep this file up to date.