Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
High resolution, unicode (emoji) to html conversion utility
npm install emojize --save
var convert = require('emojize').emojize
var html = convert('Haay 😜. Just getting ☕. But maybe 🍻 at 🕘🌜 is that 🆒')
ender add emojize
Use of this library requires <meta charset='utf-8'>
encoding if used in a browser.
<head>
<meta charset='utf-8'>
<link href='sprite/emoji.css' type='text/css'>
<script src='ender.js'></script>
</head>
var convert = require('emojize').emojize
document.getElementById('content').innerHTML = convert('Haay 😜')
emojize
defaults to sprite based conversion which ultimately requires the developer to include the sprite/emoji.css
and upload the emoji.png
along side the file. You could otherwise include all images found in img/
and pass in flag to the second argument to emojize
var emo = require('emojize')
emo.base('images/emojis/')
emo.emojize('Haay 😜', true)
/**
* outputs:
* 'Haay <img src="images/emojis/_1f61c.png">'
*/
make build
make example
open http://localhost:3000/example.jade
Each emoji defaults to 64px
× 64px
which may not always be desired. Thus, consider the following practice. Example assumes LESS.
.quarter { zoom: 0.25 }
.half { zoom: 0.5 }
.three-quarter { zoom: 0.75 }
.full { zoom: 1 }
@media screen and (max-width: 768px) {
.emoji {
.quarter()
}
}
@media screen and (max-width: 992px) {
.emoji {
.half()
}
}
@media screen and (max-width: 1200px) {
.emoji {
.three-quarter()
}
}
@media screen and (max-width: 1600px) {
.emoji {
.full()
}
}
Much thanks to Gemoji project for high resolution images and Apple Inc. for Artwork. See License
Happy Emojizing!
FAQs
Unicode to emoji conversion
We found that emojize 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.