@rivkesse/emoji-dictionary
v1.0.12
Published
Convert emoji names in unicode characters and vice versa.
Downloads
1
Maintainers
Readme
emoji-dictionary
Convert emoji names in unicode characters and vice versa. Get emoji category by emoji unicode.
:cloud: Installation
$ npm i --save @rivkesse/emoji-dictionary
:clipboard: Example
const emoji = require("emoji-dictionary");
console.log(emoji.getName("😍"));
// heart_eyes
console.log(emoji.getUnicode("heart_eyes"));
// 😍
console.log(emoji.getCategory("😍"));
// people
console.log(emoji.unicode);
// [ '💯',
// '🔢',
// '😀',
// '😬',
// '😁',
// '😂',
// '😃',
// '😄',
// ...
// '🇿🇲',
// '🇿🇼' ]
console.log(emoji.names);
// [ '100',
// '1234',
// 'grinning',
// 'grimacing',
// 'grin',
// ...
// 'ye',
// 'zm',
// 'zw' ]
:memo: Documentation
getName(unicodeChar)
Gets the name of the unicode emoji.
Params
- String
unicodeChar
: The emoji unicode character.
Return
- String The emoji name.
getUnicode(name)
Gets the unicode character by providing the emoji name.
Params
- String
name
: The emoji name.
Return
- String The emoji unicode character.
getCategory(unicodeChar)
Gets the category of the unicode emoji.
Params
- String
unicodeChar
: The emoji unicode character.
Return
- String The emoji category.
getEmojiInfo(unicodeChar)
Gets the name and category based on the emoji unicode
Params
- String
unicodeChar
: The emoji unicode character.
Return
- Object Object containing emoji unicode, name and category
:yum: How to contribute
Have an idea? Found a bug? See how to contribute.