Emoji
A simple NPM package which returns emoji by name, random emoji of the given type and a random emoji .
Installation
- Download and install NodeJS
- Install the package using npm install
$ npm install @sparshjain/emoji
Usage
- emojiByName( name : String ) returns the emoji of the corresponding name.
- randomEmojiByType( type : String ) returns a random emoji of the corresponding type.
- emojiByType( type : String ) returns array of emoji of the corresponding type.
- randomEmoji() returns a random emoji .
- Emoji object :
{
"name" : "tears of joy",
"content" : "😂",
"type" : "smiley"
}
Example
- Install the package as described above .
const {emojiByName,randomEmoji,randomEmojiByType, emojiByType} = require('@sparshjain/emoji');
console.log(emojiByName('SMILING FACE'));
console.log(randomEmojiByType('activities'));
console.log(emojiByType('food'));
console.log(randomEmoji());
or
- Clone the repo and run test.js file
$ git clone https://github.com/SparshJain2000/emoji.git
$ cd emoji
$ node test.js
Contributing
License
MIT © Sparsh Jain
Support
Give a
Connect with me