Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

emojify-text

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emojify-text

Convert boring text to wonderful emojis

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-97.14%
Maintainers
1
Weekly downloads
 
Created
Source

image

emojify-text

NPM version Build Status Coveralls Status Dependency Status

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.

Install

npm install --save emojify-text

Usage

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!') //>
// 🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏
// 🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍎🍏🍎🍏🍏🍏🍏🍎🍏🍎🍏🍏🍏🍏🍎🍏🍎🍏🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍏🍎🍏🍏🍏🍏🍎🍎🍎🍎🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏
// 🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍎🍏🍏🍏🍏🍎🍏🍏🍏🍏🍏🍏🍎🍏🍏🍏
// 🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏🍏

API

emojifyText(options, input)

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.

options

Required
Object with options.

background

Type: String
Default: 0

A character to be a background for text.
Alias: bg (background has higher priority than bg).

foreground

Type: String
Default: 1

A character to be a background as text.
Alias: fg (foreground has higher priority than fg).

row

Type: Boolean
Default: false

Render text in row or not.

dictionary

Type: Object
Default: embedded dictionary

input

Required
Type: String

Text which will be rendered as emojis.

License

MIT © Denys Dovhan

Keywords

FAQs

Package last updated on 05 Sep 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc