Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/WebReflection/emoji-essential
An emoji dictionary directly from https://unicode.org/
https://github.com/WebReflection/emoji-essential
Last synced: 17 days ago
JSON representation
An emoji dictionary directly from https://unicode.org/
- Host: GitHub
- URL: https://github.com/WebReflection/emoji-essential
- Owner: WebReflection
- License: isc
- Created: 2019-09-05T09:27:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-06T12:39:43.000Z (almost 3 years ago)
- Last Synced: 2024-11-11T21:28:28.328Z (about 1 month ago)
- Language: JavaScript
- Size: 99.6 KB
- Stars: 16
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - WebReflection/emoji-essential - An emoji dictionary directly from https://unicode.org/ (others)
README
# emoji-essential
**Social Media Photo by [Fausto GarcΓa](https://unsplash.com/@faustogarmen) on [Unsplash](https://unsplash.com/)**
An emoji dictionary directly from https://unicode.org/ updated through automation on each unicode release.
The dictionary contains groups as main key, sub group per each main key, and finally an emoji > short name key/value pair.
Suitable for most common emoji related operations/projects.
[See the dictionary](https://unpkg.com/emoji-essential@latest/index.js) via [unpkg CDN](https://unpkg.com/).
```js
import emojiEssential from 'emoji-essential';
// or
const emojiEssential = require('emoji-essential');console.log(emojiEssential.Activities.event[`π`]);
"party popper"
```## Handy variants
This section contains few ways to transform current module for you needs.
The idea is to use one base that contains all the latest unicode code, and create different versions of the same base with the smallest amount of code.
#### :emoji_name: to emoji and vice-versa
Useful for markdown cases or forums.
```js
const ee = require('emoji-essential');
const name2emoji = {};
Object.keys(ee).forEach(group => {
Object.keys(ee[group]).forEach(sub => {
Object.keys(ee[group][sub]).forEach(emoji => {
const key = `:${ee[group][sub][emoji].replace(/[ :]+/g, '_')}:`;
name2emoji[key] = emoji;
name2emoji[emoji] = key;
});
});
});name2emoji[':party_popper:']; // π
name2emoji['π']; // :party_popper:
```#### grouped by main type
Useful for emoji UI pickers.
```js
const ee = require('emoji-essential');
const ee = require('.');
const emoji = {};
Object.keys(ee).forEach(group => {
emoji[group] = {
glyph: [],
description: []
};
Object.keys(ee[group]).forEach(sub => {
Object.keys(ee[group][sub]).forEach(key => {
emoji[group].glyph.push(key);
emoji[group].description.push(ee[group][sub][key]);
});
});
});
```