Open In App

How to find relevant emoji from text on the command-line?

Last Updated : 23 Feb, 2021
Like Article

An emoji can be said to be a small image or symbol which can be used most often in place of small text or phrase to describe a situation or to express an idea or emotions. Therefore, it has now become important in today’s era to add emoji integration in the messaging, text editor apps to make use of emoji features. There is also a very decent approach to use emojis on the command line, which will replace the relevant keywords with the emojis which is more appropriate. Therefore, we have to follow certain steps to implement such a feature in our command line.

Step 1 : Our first step should be to check whether we have the latest version of Node.js installed on our computer or not. To Check that open up a terminal or command prompt on your computer and type the following command

$ node -v 

Console output : If something like this in the terminal is displayed then you have node.js already installed but please make sure to check that the version number displayed is the latest one and if you don’t see any output after putting in the command then please download the latest version of Node.js from their official website. Refer to this article.

Step 2 : In our second step, we will be downloading and installing the emoj package on our machine using the below command. 

$ npm install --global emoj

Console output :

Step 3 : Now as we have got our package installed on our machine, we will be trying some examples of particular keywords which can be picked up and converted into emojis easily. Therefore to do so we will have to use the emoj keyword before “the actual sentence containing a keyword or only the keyword”. For example ” emoj horse”, ” emoj train ” etc, and press Enter.

Console output :

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads