1.3.1 • Published 1 year ago
emoji-info v1.3.1
emoji-info
Get information about emojis
getEmoji("😳")Install
$ npm i emoji-infoUsage
import { getEmoji, isEmoji, emojiList, emojiInfo } from "emoji-info"getEmoji(emoji)
Gets the information about an emoji, from either the character, or one of its names.
The emoji is allowed to have : either side of it, eg: :😳:, :flushed:
getEmoji("😳")
// Outputs:
Emoji {
  "emoji": "😳",
  "names": [
    "flushed",
    "flushed_face"
  ],
  "codepoint": "1f633",
  "slug": "flushed-face"
}isEmoji(emoji, textAllowed)
Checkes whether a string is a valid emoji. The textAllowed argument allows emoji names to be entered as well.
isEmoji("😳") // true
isEmoji("flushed") // false
isEmoji("flushed", true) // trueemojiList
Outputs an array of all of the emoji characters.
emojiInfo
Outputs an array of the information for all emojis.