1 | # Unicode Emoji JSON [![Test status](https://github.com/muan/unicode-emoji-json/workflows/Node%20CI/badge.svg)](https://github.com/muan/unicode-emoji-json/actions?query=workflow%3A%22Node+CI%22)
|
2 |
|
3 | This library provides a up-to-date version of emoji data from Unicode in JSON format, in a number of easily consumable file structures.
|
4 |
|
5 | Check out [`muan/emojilib`](https://github.com/muan/emojilib) for emoji keyword pairings for extended searchability.
|
6 |
|
7 | ## Details
|
8 |
|
9 | ### RGI only
|
10 |
|
11 | This data does not contain minimally-qualified and unqualified emoji.
|
12 |
|
13 | > RGI: Recommended for General Interchange. A subset of emojis which is likely to be widely supported across multiple platforms.
|
14 |
|
15 | > Minimally-qualified or unqualified emoji zwj sequences may be handled in the same way as their fully-qualified forms; the choice is up to the implementation.
|
16 |
|
17 | Full description can be found at http://www.unicode.org/reports/tr51/.
|
18 |
|
19 | ### Skin tone variations
|
20 |
|
21 | Emoji's skin tone variations are consolidated into one base entry, with a `skin_tone_support` flag on them.
|
22 |
|
23 | This means one entry of π represents its 5 variationsβ ππ», ππΌ, ππ½, ππΎ, ππΏ; while raw unicode data list them as individual emoji entries.
|
24 |
|
25 | ## Files
|
26 |
|
27 | `data-by-emoji.json`:
|
28 |
|
29 | ```json
|
30 | {
|
31 | "π": {
|
32 | "name": "grinning face",
|
33 | "slug": "grinning_face",
|
34 | "group": "Smileys & Emotion",
|
35 | "emoji_version": "2.0",
|
36 | "unicode_version": "6.1",
|
37 | "skin_tone_support": false
|
38 | },
|
39 | ...
|
40 | "π": {
|
41 | "name": "waving hand",
|
42 | "slug": "waving_hand",
|
43 | "group": "People & Body",
|
44 | "emoji_version": "2.0",
|
45 | "unicode_version": "6.0",
|
46 | "skin_tone_support": true,
|
47 | "skin_tone_support_unicode_version": "8.0"
|
48 | },
|
49 | }
|
50 | ```
|
51 |
|
52 | `data-by-group.json`:
|
53 |
|
54 | ```json
|
55 | {
|
56 | "Smileys & Emotion": [
|
57 | {
|
58 | "emoji": "π",
|
59 | "skin_tone_support": false,
|
60 | "name": "grinning face",
|
61 | "slug": "grinning_face",
|
62 | "unicode_version": "6.1",
|
63 | "emoji_version": "2.0"
|
64 | },
|
65 | ],
|
66 | ...
|
67 | }
|
68 | ```
|
69 |
|
70 | `data-ordered-emoji.json`:
|
71 |
|
72 | ```
|
73 | [
|
74 | "π",
|
75 | "π",
|
76 | ...
|
77 | ]
|
78 | ```
|
79 |
|
80 | `data-emoji-components.json`:
|
81 |
|
82 | ```json
|
83 | {
|
84 | "light_skin_tone": "π»",
|
85 | "medium_light_skin_tone": "πΌ",
|
86 | ...
|
87 | }
|
88 | ```
|
89 |
|
90 | ## Development
|
91 |
|
92 | 1. `npm install`
|
93 |
|
94 | Install dependencies.
|
95 |
|
96 | 2. `npm run download`
|
97 |
|
98 | Download the latest data dump from unicode.org. Update the version variable in this file when a new version is available. Experiment with a version by passing an argument for version number: `npm run download 13.0`.
|
99 |
|
100 | 3. `npm run build`
|
101 |
|
102 | Parse and format the downloaded data into different files for distribution. This script also generates `stats.json` for use in test. Update the parser if the content format from unicode data has changed.
|
103 |
|
104 | 4. `npm test`
|
105 |
|
106 | Run test that ensures the build data matches the count of emoji parsed from the data source.
|
107 |
|
108 | A common People's category test failure after an Emoji version upgrade might be that [there are new dual skin tone emoji unaccounted for](https://github.com/muan/unicode-emoji-json/blob/fc40d2e86da1c0ba8a672176f85e4363cd0dadd9/script/generate-emoji-counts.js#L11). Verify this by reading through the change log and see if there are any emoji that can be modified with two skin tone modifiers and add them to `generate-emoji-counts.js` then run `npm run build` which will update `stats.json`; then run the test again. This isn't automated currently. [See #3](https://github.com/muan/unicode-emoji-json/issues/3).
|
109 |
|
110 | ## Unicode License Agreement
|
111 |
|
112 | https://www.unicode.org/license.html
|