gemoji
Info on gemoji.
Contents
- What is this?
- When should I use this?
- Install
- Use
- API
- Types
- Data
- Compatibility
- Security
- Related
- Contribute
- Notice
- License
What is this?
This package contains info on gemoji (GitHub Emoji).
Gemoji are the shortcodes that GitHub uses to represent emoji.
For example, :grinning:
can be used for ๐
.
When should I use this?
Use this package if you need:
- info on gemoji, such as associated tags, description, and category
- to map between emoji and names and vice versa
- to list emoji or names
Install
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
npm install gemoji
In Deno with esm.sh
:
import {gemoji} from 'https://esm.sh/gemoji@8'
In browsers with esm.sh
:
<script type="module">
import {gemoji} from 'https://esm.sh/gemoji@8?bundle'
</script>
Use
See examples below.
API
This package exports the identifiers gemoji
, emojiToName
, and
nameToEmoji
.
There is no default export.
gemoji
List of info objects (Array<Gemoji>
).
Each Gemoji
has the following fields:
emoji
(string
) โ example:๐
names
(Array<string>
) โ example:['grinning']
tags
(Array<string>
) โ example:['smile', 'happy']
description
(string
) โ example:grinning face
category
(string
) โ example:Smileys & Emotion
Example
import {gemoji} from 'gemoji'
console.log(gemoji)
Yields:
[
{
emoji: '๐',
names: ['grinning'],
tags: ['smile', 'happy'],
description: 'grinning face',
category: 'Smileys & Emotion'
},
{
emoji: '๐',
names: ['smiley'],
tags: ['happy', 'joy', 'haha'],
description: 'grinning face with big eyes',
category: 'Smileys & Emotion'
},
{
emoji: '๐',
names: ['smile'],
tags: ['happy', 'joy', 'laugh', 'pleased'],
description: 'grinning face with smiling eyes',
category: 'Smileys & Emotion'
},
// โฆ
]
nameToEmoji
Map of names (100
) to emoji (๐ฏ
) (Record<string, string>
).
Example
import {nameToEmoji} from 'gemoji'
console.log(nameToEmoji.cat) //=> ๐ฑ
console.log(nameToEmoji.poop) //=> ๐ฉ
emojiToName
Map of emoji (๐
) to names (grinning
) (Record<string, string>
).
Example
import {emojiToName} from 'gemoji'
console.log(emojiToName['๐ถ']) //=> dog
console.log(emojiToName['\uD83D\uDCA9']) //=> hankey
Types
This package is fully typed with TypeScript.
It exports an additional type Gemoji
.
Data
See support.md
for what info is included.
The data is crawled from github/gemoji
and later processed for relevant
information.
No images are included in this repository: the copyrighted material may or may not be available on the users computer.
Compatibility
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.
Security
This package is safe.
Related
words/emoji-emotion
โ list of emoji rated for valencewooorm/emoticon
โ info on ASCII emoticonswooorm/strip-skin-tone
โ strip skin-tones from emojiwooorm.com/checkmoji
โ check emoji across platforms
Contribute
Yes please! See How to Contribute to Open Source.
Notice
wooorm/gemoji
is not affiliated with GitHub.
See its github/gemoji
for info on GHs licensing.
License
MIT ยฉ Titus Wormer