1 | # emoji.json [![npm](https://img.shields.io/npm/v/emoji.json.svg?style=flat-square)](https://www.npmjs.com/package/emoji.json)
|
2 |
|
3 | Just an emoji.json.
|
4 |
|
5 | Generated from [emoji-test.txt](https://unicode.org/Public/emoji/13.0/emoji-test.txt) with [this script](scripts/gen.js).
|
6 |
|
7 | > NOTE: There are no Emoji versions 6.0-10.0 as a decision was made in 2017 to align emoji version numbers with their respective Unicode versions starting with version 11.0.
|
8 |
|
9 | ### Usage
|
10 |
|
11 | **install with npm**
|
12 |
|
13 | `npm install emoji.json` then:
|
14 |
|
15 | ```javascript
|
16 | var emoji = require('emoji.json')
|
17 | console.log(emoji[2])
|
18 | // {
|
19 | // codes: '1F604',
|
20 | // char: '😄',
|
21 | // name: 'grinning face with smiling eyes',
|
22 | // category: 'Smileys & Emotion'
|
23 | // }
|
24 | ```
|
25 |
|
26 | if you care about file size:
|
27 |
|
28 | ```javascript
|
29 | var emojiCompact = require('emoji.json/emoji-compact.json')
|
30 | console.log(emojiCompact)
|
31 | // ["😀","😁","😂","🤣" ...]
|
32 | ```
|
33 |
|
34 | **fetch from web**
|
35 |
|
36 | - https://unpkg.com/emoji.json/emoji.json
|
37 | - https://unpkg.com/emoji.json/emoji-compact.json
|