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.
emojify-text
Advanced tools
Convert boring text to wonderful emojis
This package was made just for fun. Мe and Serhiy Boreyko were build that funny utility in the train while we were going home after LvivJS'2016 conference. Actually, that was cool timekiller.
npm install --save emojify-text
import emojifyText from 'emojify-text';
emojifyText({ bg: '⭐️', fg: '💙' }, 'yay') //>
// ⭐️⭐️⭐️⭐️⭐️⭐️⭐️
// ⭐️💙⭐️⭐️⭐️💙⭐️
// ⭐️⭐️💙⭐️💙⭐️⭐️
// ⭐️⭐️⭐️💙⭐️⭐️⭐️
// ⭐️⭐️⭐️💙⭐️⭐️⭐️
// ⭐️⭐️⭐️💙⭐️⭐️⭐️
// ⭐️⭐️⭐️⭐️⭐️⭐️⭐️
// ⭐️⭐️⭐️⭐️⭐️⭐️⭐️
// ⭐️⭐️⭐️💙⭐️⭐️⭐️
// ⭐️⭐️💙⭐️💙⭐️⭐️
// ⭐️💙⭐️⭐️⭐️💙⭐️
// ⭐️💙💙💙💙💙⭐️
// ⭐️💙⭐️⭐️⭐️💙⭐️
// ⭐️⭐️⭐️⭐️⭐️⭐️⭐️
// ⭐️⭐️⭐️⭐️⭐️⭐️⭐️
// ⭐️💙⭐️⭐️⭐️💙⭐️
// ⭐️⭐️💙⭐️💙⭐️⭐️
// ⭐️⭐️⭐️💙⭐️⭐️⭐️
// ⭐️⭐️⭐️💙⭐️⭐️⭐️
// ⭐️⭐️⭐️💙⭐️⭐️⭐️
// ⭐️⭐️⭐️⭐️⭐️⭐️⭐️
The function is curried as default. That means you could prepare settings and use the result function like this:
import emojifyText from 'emojify-text'
const emojify = emojifyText({
background: '🍏',
foreground: '🍎',
row: true
})
emojify('yay!') //>
// 🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏
// 🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍎🍏🍎🍏🍏🍏🍏🍎🍏🍎🍏🍏🍏🍏🍎🍏🍎🍏🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍏🍎🍏🍏🍏🍏🍎🍎🍎🍎🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏
// 🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏
Return a string which is generated based on input
and provided options
.
If input
is not provided, then it will return a function that takes input
.
Required
Object with options.
Type: String
Default: 0
A character to be a background for text.
Alias: bg
(background
has higher priority than bg
).
Type: String
Default: 1
A character to be a background as text.
Alias: fg
(foreground
has higher priority than fg
).
Type: Boolean
Default: false
Render text in row or not.
Type: Object
Default: embedded dictionary
Required
Type: String
Text which will be rendered as emojis.
MIT © Denys Dovhan
FAQs
Convert boring text to wonderful emojis
We found that emojify-text 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.