
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
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
The npm package emojize receives a total of 2 weekly downloads. As such, emojize popularity was classified as not popular.
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.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.