Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textemoticons.js

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textemoticons.js

Emoticon text codes to emoticons 🎱 ❤️ 🚀

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

emoticons.js

Emoticon text codes to emoticons 🎱 ❤️ 🚀. It downloads official Emoji list from Unicode.org

What's new

  • Now it uses latest Unicode.org emojis :new:
  • Support for Emoji Modifier Sequences :new:
  • Added correct length calculation of a text containing Emoji

Install from npm

npm install textemoticons.js

Get Emoji from Emoticon Text Code

const EmoticonsJS = require('textemoticons.js');
var emoji = EmoticonsJS.emoji[ "pool_8_ball" ]
🎱

Top Nearest emoji from Text

const EmoticonsJS = require('textemoticons.js');
EmoticonsJS.nearest("button", 10).then(emoji => console.log(emoji) )
[ '⏹', '⏸', '🔘', '⏺', '🔲', '⏭', '🚅', '🔳', '⏯', '⏮' ]

Fuzzy search Emoji from Text

const EmoticonsJS = require('textemoticons.js');
EmoticonsJS.match("cat", 10).then(emoji => console.log(emoji) )
[ '🤠', '😰', '🎃', '😺', '😸', '😹', '😻', '😼', '😽', '🙀' ]

Count length of text containing Emoji :new:

const EmoticonsJS = require('textemoticons.js');
EmoticonsJS.length("Look at " + EmoticonsJS.emoji[ "point_down" ])
9

Download Emoji text file from Unicode.org :new:

// 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);
})

Unicode.org Emoji text file

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"
}

FAQs

Package last updated on 19 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc