emoji-info
v1.3.1
Published
Get information about emojis
Downloads
6
Maintainers
Readme
emoji-info
Get information about emojis
getEmoji("😳")
Install
$ npm i emoji-info
Usage
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) // true
emojiList
Outputs an array of all of the emoji characters.
emojiInfo
Outputs an array of the information for all emojis.