2.1.0 ā€¢ Published 4 years ago

@sparshjain/emoji v2.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Emoji

A simple NPM package which returns emoji by name, random emoji of the given type and a random emoji .

npm (scoped) npm bundle size (scoped version) npm collaborators NPM

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

šŸ“ Fork the repository

šŸ“ Change it / add your code

āœ”ļø Do a "pull request"

License

MIT Ā© Sparsh Jain

Support

Give a šŸŒŸ to this repo if you liked it.

Connect with me

Instagram LinkedIn Github