node-emoji
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
lodash | 4.17.21 | 311.49 kB | MIT | prod |
Node-emoji is a useful tool in the Node.js ecosystem for providing friendly emoji lookups and parsing utilities. It deploys the power of the combination of emojilib, which supplies a list of emojis and keyword search functionality, and skin-tone, which can parse base emojis from different skin tones. With node-emoji, you can add vibrant emojis to your applications and projects and appeal more to your users.
To use node-emoji in your project, you should first install it via npm using the command npm install --save node-emoji
. Then you can import the node-emoji
module to your code using Javascript's import statement and utilize its various functions such as emojify
, find
, get
, has
, random
, replace
, search
, strip
, unemojify
, and which
. Here are a few examples:
import * as emoji from 'node-emoji'
console.log(emoji.emojify('The :unicorn: is a fictitious animal.')) // 'The π¦ is a fictitious animal.'
console.log(emoji.find('π¦')) // { name: 'unicorn', emoji: 'π¦' }
console.log(emoji.get('unicorn')) // 'π¦'
console.log(emoji.has('π¦')) // true
console.log(emoji.random()) // { name: 'unicorn', emoji: 'π¦' }
console.log(emoji.replace('The π¦ is a fictitious animal.', 'unicorn')) // 'The unicorn is a fictitious animal.'
console.log(emoji.search('honey')) // [ { name: 'honeybee', emoji: 'π' }, { name: 'honey_pot', emoji: 'π―' } ]
console.log(emoji.unemojify('The π¦ is a fictitious animal.')) // 'The :unicorn: is a fictitious animal.'
console.log(emoji.which('π¦')) // 'unicorn'
You can find the documentation of node-emoji on its GitHub page at https://github.com/omnidan/node-emoji. The README file on this page provides a detailed guide on how to use node-emoji, including the API, various examples of using functions, parameters, and the options available within these functions. It's a fantastic resource for getting started and mastering how to use this package successfully.