emoji-api
v3.0.1
Published
Simple Emoji API
Downloads
55,151
Maintainers
Readme
EmojiAPI
Simple Emoji API.
Installing
$ npm i emoji-api
Example
// ESM
import * as emoji from "emoji-api";
// CJS
const emoji = require("emoji-api");
console.log(emoji.get("🥺"));
/*
Emoji {
_data: {
emoji: '🥺',
name: 'pleading face',
group: 'Smileys & Emotion',
sub_group: 'face-concerned',
codepoints: '1F97A'
}
}
*/
console.log(emoji.get("🥺").formattedName); // Pleading Face
console.log(emoji.get("🥺").twemoji()); // https://twemoji.maxcdn.com/v/latest/72x72/1f97a.png
Arrange emojis by category
const { arrange } = require("emoji-api");
console.log(arrange()); // { "Smileys & Emotion": [Emoji, Emoji, ...], ... }
Other Examples
console.log(emoji.all()); // [Emoji, Emoji, Emoji, ...]
console.log(emoji.emojiToUnicode("🥺")); // 1f97a
console.log(emoji.unicodeToEmoji("1f97a")); // 🥺