Emoticon text codes to emoticons ๐ฑ โค๏ธ ๐. It downloads official Emoji list from Unicode.org
- Now it uses latest Unicode.org emojis ๐
- Support for Emoji Modifier Sequences ๐
- Added correct length calculation of a text containing Emoji
npm install textemoticons.js
const EmoticonsJS = require('textemoticons.js');
var emoji = EmoticonsJS.emoji[ "pool_8_ball" ]
๐ฑ
const EmoticonsJS = require('textemoticons.js');
EmoticonsJS.nearest("button", 10).then(emoji => console.log(emoji) )
[ 'โน', 'โธ', '๐', 'โบ', '๐ฒ', 'โญ', '๐
', '๐ณ', 'โฏ', 'โฎ' ]
const EmoticonsJS = require('textemoticons.js');
EmoticonsJS.match("cat", 10).then(emoji => console.log(emoji) )
[ '๐ค ', '๐ฐ', '๐', '๐บ', '๐ธ', '๐น', '๐ป', '๐ผ', '๐ฝ', '๐' ]
const EmoticonsJS = require('textemoticons.js');
EmoticonsJS.length("Look at " + EmoticonsJS.emoji[ "point_down" ])
9
// Grab the latest version of Emoji from Unicode.org
EmoticonsJS.download({ version: '13.1' }).
then(emoji => {
console.log(JSON.stringify( emoji, null, 2) );
})
.catch(error => {
console.error(error);
})
Array of emoji with Unicode point, emoji and description
{
"codes": [
"1F912"
],
"emoji": "๐ค",
"description": " fully-qualified # ๐ค E1.0 face with thermometer",
"textcode": "face_with_thermometer"
}
It supports multiple codes as well:
{
"codes": [
"1F449",
"1F3FB"
],
"emoji": "๐๐ป",
"description": " fully-qualified # ๐๐ป E1.0 backhand index pointing right: light skin tone",
"textcode": "backhand_index_pointing_right:_light_skin_tone"
}