Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
The emojilib npm package is a library that provides a comprehensive list of emoji keywords and their corresponding emoji characters. It is useful for applications that need to display, search, or categorize emojis based on keywords.
Get Emoji by Keyword
This feature allows you to retrieve an emoji object by its keyword. The object contains the emoji character, associated keywords, and other metadata.
const emojilib = require('emojilib');
const emoji = emojilib.lib['grinning'];
console.log(emoji); // Output: { keywords: [ 'face', 'smile', 'happy', 'joy', 'kawaii' ], char: '😀', fitzpatrick_scale: false, category: 'people' }
List All Emojis
This feature allows you to list all available emojis in the library. It maps through the emoji library and extracts the emoji characters.
const emojilib = require('emojilib');
const allEmojis = Object.keys(emojilib.lib).map(key => emojilib.lib[key].char);
console.log(allEmojis); // Output: Array of all emoji characters
Search Emojis by Keyword
This feature allows you to search for emojis by a specific keyword. It filters the emoji library based on the presence of the keyword in the emoji's keywords array.
const emojilib = require('emojilib');
const searchEmojis = (keyword) => {
return Object.keys(emojilib.lib).filter(key => emojilib.lib[key].keywords.includes(keyword)).map(key => emojilib.lib[key].char);
};
console.log(searchEmojis('happy')); // Output: Array of emojis related to 'happy'
The emoji-dictionary package provides a simple way to get emoji characters by name and vice versa. It is similar to emojilib but focuses more on direct name-to-emoji and emoji-to-name conversions.
The node-emoji package offers a straightforward API to get emoji characters by name, replace emoji names in a string with actual emojis, and more. It is more focused on string manipulation involving emojis compared to emojilib.
The emojione package provides a comprehensive set of emoji assets and a library to convert emoji shortcodes, unicode, and ASCII emoticons into emoji images. It offers more extensive functionality for rendering and displaying emojis compared to emojilib.
Emoji keyword library.
bower install emojilib
npm install emojilib --save
> var emoji = require("emojilib")
> emoji.lib
{
"grinning": {
"keywords": ["face", "smile", "happy", "joy"],
"char": "😀",
"fitzpatrick_scale": false,
"category": "people"
},
"grin": {
"keywords": ["face", "happy", "smile", "joy"],
"char": "😁",
"fitzpatrick_scale": false,
"category": "people"
},
...
}
> emoji.ordered
[ 'grinning', 'grimacing', 'grin', 'joy', 'smiley', 'smile', 'sweat_smile', ...]
> emoji.fitzpatrick_scale_modifiers
[ '🏻', '🏼', '🏽', '🏾', '🏿' ]
> emoji.lib.v.fitzpatrick_scale
true
> emoji.lib.turtle.fitzpatrick_scale
false
> emoji.lib.v.char + emoji.fitzpatrick_scale_modifiers[4]
'✌🏿'
FAQs
Emoji keyword library.
The npm package emojilib receives a total of 1,463,153 weekly downloads. As such, emojilib popularity was classified as popular.
We found that emojilib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.