@marianmeres/emoji-list
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@marianmeres/emoji-list

List of emojis (data from https://unicode.org/emoji/charts/full-emoji-list.html) compiled into javascript plain object maps. Useful as a low level helpers for various emoji processing tools.

NOTE: only default skin-tone

key to hex

import { emojiKeyMap } from './@marianmers/emoji-list';

// emojiKeyMap contains full key-to-hex map of all emojis
{
    "grinningFace": "1f600",
    // ... ~1870 records omitted here
    "flagWales": "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"
}

hex to key

import { emojiCodeMap } from './@marianmers/emoji-list';

// emojiCodeMap contains full hex-to-key map of all emojis
{
    "1f600": "grinningFace",
    // ... ~1870 records omitted here
    "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f": "flagWales"
}

groups map (both major and minor)

import { emojiKeyToGroupMap, emojiGroupToKeyMap } from './@marianmers/emoji-list';

// emojiKeyToGroupMap contains full key-to-groups [major, minor] map
{
    "grinningFace": [ "smileys and emotion", "face-smiling" ],
    // ... ~1870 records omitted here
    "flagWales": [ "flags", "subdivision-flag" ]
}

// emojiGroupToKeyMap contains full group-to-key map
{
    // major group
    "smileys and emotion": [ "grinningFace", /*...*/ ],
    // ...
	
    // major/minor group
    "smileys and emotion/face-smiling": [ "grinningFace", /*...*/ ],
    // ...
}

text description

import { emojiFulltextMap } from './@marianmers/emoji-list';

// emojifulltextMap contains full key-to-text map of all emojis
{
    "grinningFace": "grinning face",
    // ... ~1870 records omitted here
    "flagWales": "flag: Wales"
}

emojiToKey and keyToEmoji helpers

import { emojiToKey, keyToEmoji } from './@marianmers/emoji-list';

assert('pileOfPoo' === emojiToKey('💩'));
assert('💩' === keyToEmoji('pileOfPoo'));

Readme

Keywords

none

Package Sidebar

Install

npm i @marianmeres/emoji-list

Weekly Downloads

1

Version

1.2.0

License

MIT

Unpacked Size

348 kB

Total Files

12

Last publish

Collaborators

  • marianmeres