1.0.12 β’ Published 8 years ago
@rivkesse/emoji-dictionary v1.0.12
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.