Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
emojideas
Advanced tools
Readme
Text-to-emoji suggestion library with a Lunr and emojilib backend. Suggestions are based on emoji name and keywords.
Install the library:
npm install --save emojideas
# or
yarn add emojideas
Require the module, create an instance, and call the suggest
function on some text:
const Emojideas = require('emojideas');
const e = new Emojideas();
e.suggest('aerial tramway');
// => [ '🚡' ]
Results are ordered based on the score calculated by Lunr.
The constructor accepts several options.
option | description |
---|---|
fuzzy | level of fuzzyness to apply to all Lunr queries (default: 0 ) |
nameBoost | weight applied to emoji name relative to keywords when ordering results (default: 3 ) |
formatOutput | function passed each Lunr result to format output (default: el => el.ref ) |
require('emojilib')['🚡'];
// => [ 'aerial_tramway', 'transportation', 'vehicle', 'ski' ]
const f = new Emojideas({ fuzzy: 1 });
f.suggest('trumway');
// => [ '🚡' ]
const g = new Emojideas({ nameBoost: 0 });
g.suggest('aerial tramway');
// => []
const h = new Emojideas({ formatOutput: el => [el.ref, el.score] });
h.suggest('aerial tramway');
// => [ [ '🚡', 28.254572762652064 ] ]
All queries are passed directly to the Lunr backend, and can therefore use the Lunr syntax, except when the fuzzy
option has been set.
require('emojilib')['🚊'];
// => [ 'tram', 'transportation', 'vehicle' ]
const e = new Emojideas();
e.suggest('tram');
// => [ '🚊', '🚋' ]
e.suggest('tram*');
// => [ '🚊', '🚡', '🚋' ]
e.suggest('aerial tram*');
// => [ '🚡', '🚊', '🚋' ]
e.suggest('tram* -tram');
// => [ '🚡' ]
A command line search implementation based on Commander is included.
Install the library globally:
npm install -g emojideas
# or
yarn global add emojideas
Run a query:
emojideas aerial tramway
# => [ '🚡' ]
To see available options:
emojideas --help
FAQs
Suggest Emoji based on name or keyword.
The npm package emojideas receives a total of 22 weekly downloads. As such, emojideas popularity was classified as not popular.
We found that emojideas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.