gemoji

GitHub emoji: gemoji

Usage no npm install needed!

<script type="module">
  import gemoji from 'https://cdn.skypack.dev/gemoji';
</script>

README

gemoji

Build Coverage Downloads Size

Gemoji (GitHub Emoji) contains info (category, description, names, and tags) on Emoji and GitHub “Gemoji” shortcodes.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install gemoji

Use

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'
  },
  {
    emoji: '😁',
    names: ['grin'],
    tags: [],
    description: 'beaming face with smiling eyes',
    category: 'Smileys & Emotion'
  },
  {
    emoji: '😆',
    names: ['laughing', 'satisfied'],
    tags: ['happy', 'haha'],
    description: 'grinning squinting face',
    category: 'Smileys & Emotion'
  },
  // …
]

Get emoji

import {nameToEmoji} from 'gemoji'

console.log(nameToEmoji.cat)
console.log(nameToEmoji.poop)

Yields:

🐱
💩

Get name

import {emojiToName} from 'gemoji'

console.log(emojiToName['🐶'])
console.log(emojiToName['\uD83D\uDCA9'])

Yields:

dog
hankey

API

This package exports the following identifiers: gemoji, nameToEmoji, emojiToName. There is no default export.

gemoji

Info[], where each Info is Object with:

  • emoji: string, example: 😀
  • names: string[], example: ['grinning']
  • tags: string[], example: ['smile', 'happy']
  • description: string, example: grinning face
  • category: string, example: Smileys & Emotion

nameToEmoji

Object.<string, string> — map names (100) to emoji (💯).

emojiToName

Object.<string, string> — map names (😀) to emoji (grinning).

Supported Gemoji

See support.md.

Data

The emoji list is crawled from github/gemoji and later processed for relevant information. See its license for more information.

No images are included in this repository: the copyrighted material may or may not be available on the users computer.

Related

Disclaimer

wooorm/gemoji is not affiliated with GitHub.

License

MIT © Titus Wormer