Skip to content

sdewitt-newrelic/Unicode-Emoji

Β 
Β 

Repository files navigation

Unicode Emoji

Raw data for Unicode Emoji πŸ™‚

The data are generated using the Unicode Emoji, Version 13.1 from Unicode

You can learn more about emojis at Emojipedia or find some implementation details and trivia on the Wiki

πŸ‘‰ Demo

Check the generated CSV file

Or just take a look of what you can achieve using this package

πŸ”Œ Installation

npm install unicode-emoji

🧰 Usage

Import

This NPM package uses the ES6 import syntax (you'll need Node.js v14+ if you are not using TypeScript)

import * as unicodeEmoji from 'unicode-emoji';

Retrieve emojis

unicodeEmoji.getEmojis();
[
    {
        "emoji": "πŸ˜€", // Emoji without skin tone variation
        "description": "grinning face",
        "version": "1.0",
        "keywords": ["face", "grin", "grinning face"],
        "category": "face-emotion",
        "group": "smileys-emotion",
        "subgroup": "face-smiling"
    },
    {
        "emoji": "πŸ‘‹", // Emoji with skin tone variation
        "description": "waving hand",
        "version": "0.6",
        "keywords": ["hand", "wave", "waving"],
        "category": "face-emotion",
        "group": "people-body",
        "subgroup": "hand-fingers-open",
        "variations": [
            {
                "emoji": "πŸ‘‹πŸ»",
                "description": "waving hand: light skin tone",
                "version": "1.0"
            },
            {
                "emoji": "πŸ‘‹πŸΌ",
                "description": "waving hand: medium-light skin tone",
                "version": "1.0"
            },
            // ...
        ]
    },
    // ...
]

Retrieve components

unicodeEmoji.getComponents();
{
    "skin-tone": [
        {
            "emoji": "🏻",
            "description": "light skin tone",
            "version": "1.0"
        },
        {
            "emoji": "🏼",
            "description": "medium-light skin tone",
            "version": "1.0"
        },
        // ...
    ],
    "hair-style": [
        {
            "emoji": "🦰",
            "description": "red hair",
            "version": "11.0"
        },
        {
            "emoji": "🦱",
            "description": "curly hair",
            "version": "11.0"
        },
        // ...
    ]
}

Grouping & filtering

You can group & filter emojis by category, group, subgroup or version

Here is an example :

  • grouped by category
  • without the emojis from the flags category
  • without the emojis from the 12.1, 13.0 & 13.1 versions
const groupBy = 'category';
const omitWhere = { category: ['flags'], version: ['12.1', '13.0', '13.1'] };

// Only omitting
unicodeEmoji.getEmojis(omitWhere)

// Grouping and omitting
unicodeEmoji.getEmojisGroupedBy(groupBy, omitWhere);

πŸ“‹ Details

While complete data are available on GitHub :

  • unicode-emoji.csv provides complete flat data
  • unicode-emoji.json provides complete hierarchical data

Only the stripped-down unicode-emoji.js file is bundled within this NPM package to greatly reduce its size

About

Raw data for Unicode Emoji πŸ™‚

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%