Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 1.4 KB

tpl.readme.md

File metadata and controls

67 lines (42 loc) · 1.4 KB

About

{{pkg.description}}

There're lots of other emoji packages available, most of them with various additional functionality & dependencies. In contrast, this package merely provides simple bi-directional mappings between emoji names & their actual characters.

The function replaceNames() can be used to replace all known :emoji_name: occurrences in a given string with their corresponding emoji character...

References

The index is based on the one used by node-emoji (which itself is sourced from the js-emoji package).

For reasons of uniformity, all hyphens (-) in names have been replaced with underscores (_).

{{meta.status}}

{{repo.supportPackages}}

{{repo.relatedPackages}}

{{meta.blogPosts}}

Installation

{{pkg.install}}

{{pkg.size}}

Dependencies

{{pkg.deps}}

{{repo.examples}}

API

{{pkg.docs}}

import { EMOJI, NAMES, replaceNames } from "@thi.ng/emoji";

console.log(EMOJI["minibus"]);
// "🚐"

console.log(NAMES["🚐"]);
// "minibus"

console.log(replaceNames("Amazing :grin::heart_eyes::invalid:!"));
// "Amazing 😁😍:invalid:!"