0.6.0 β€’ Published 2 years ago

@qit.tools/unicode-emoji-json-lite v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Unicode Emoji JSON Lite

Test status

This πŸ“š library provides a πŸͺΆ lightweight version of the unicode-emoji-json library. Essentially, this library simplifies JSON files by using ready-made JSON from the unicode-emoji-json library.

RGI only

This data does not contain minimally-qualified and unqualified emoji.

RGI: Recommended for General Interchange. A subset of emojis which is likely to be widely supported across multiple platforms.

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.

Full description can be found at http://www.unicode.org/reports/tr51/.

To change the skin tone using JavaScript, use our library @qit.tools/skin-tone.

πŸ‘€ DEMO

Example of using the library: Random Emoji Generator

CDN

πŸ—οΈ Install

πŸŽ‰ NPM

npm install @qit.tools/unicode-emoji-json-lite

🧁 Bun

bun add @qit.tools/unicode-emoji-json-lite

🌟 PNPM

pnpm add @qit.tools/unicode-emoji-json-lite

🧢 Yarn

yarn add @qit.tools/unicode-emoji-json-lite

πŸŽ“ How to use

// Import by default
import dataEmoji from "@qit.tools/unicode-emoji-json-lite";

// Import by JSON files
import dataEmoji from "@qit.tools/unicode-emoji-json-lite/data-by-emoji-lite.json";
import dataEmojiGroup from "@qit.tools/unicode-emoji-json-lite/data-by-group-lite.json";
// ...

// Import types
import type { DataEmoji, DataEmojiGroup, DataEmojiMap, DataEmojiOrdered } from "@qit.tools/unicode-emoji-json-lite";

πŸ“ Details

Skin tone variations

Emoji's skin tone variations are consolidated into one base entry, with a tone flag on them.

This means one entry of πŸ‘‹ represents its 5 variations– πŸ‘‹πŸ», πŸ‘‹πŸΌ, πŸ‘‹πŸ½, πŸ‘‹πŸΎ, πŸ‘‹πŸΏ; while raw unicode data list them as individual emoji entries.

The tone flag is present where needed; in other cases, it remains undefined to avoid creating a negative flag.

πŸ“„ Files

data-by-emoji-lite.json:

{
  "πŸ˜€": {
    "name": "grinning face",
    "group": "SE"
  },
  ...
  "πŸ‘‹": {
    "name": "waving hand",
    "group": "PB",
    "tone": true
  },
}

data-by-group-lite.json:

[
  {
    "name": "SE",
    "emojis": [
      {
        "emoji": "πŸ˜€",
        "name": "grinning face"
      },
      ...
    ]
  }
]

data-emoji-components.json:

{
  "light_skin_tone": "🏻",
  "medium_light_skin_tone": "🏼",
  "medium_skin_tone": "🏽",
  "medium_dark_skin_tone": "🏾",
  "dark_skin_tone": "🏿",
  "red_hair": "🦰",
  "curly_hair": "🦱",
  "white_hair": "🦳",
  "bald": "🦲"
}

data-group-map.json:

{
  "SE": "Smileys & Emotion",
  "PB": "People & Body",
  "AN": "Animals & Nature",
  "FD": "Food & Drink",
  "TP": "Travel & Places",
  "A": "Activities",
  "O": "Objects",
  "S": "Symbols",
  "F": "Flags"
}

data-ordered-emoji.json:

[
  "πŸ˜€",
  "πŸ˜ƒ",
  "πŸ˜„",
  "😁",
  ...
]

Showcases

Chrome Extension: Emoji Keyboard Copy & Paste

Edge Add-on: Emoji Keyboard Copy & Paste

Website: Emoj.in

License

MIT

Unicode License Agreement

https://www.unicode.org/license.html

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.8

2 years ago

0.3.5

2 years ago

0.1.7

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.3.2

2 years ago

0.2.3

2 years ago

0.1.4

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.2.2

2 years ago

0.5.2

2 years ago

0.4.3

2 years ago

0.3.4

2 years ago

0.2.5

2 years ago

0.1.6

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.3.3

2 years ago

0.2.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago