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

emoji-shortname-to-image

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emoji-shortname-to-image

Replace emoji shortnames with image tags

  • 1.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

emoji-shortname-to-image

Installation

yarn add emoji-shortname-to-image

Usage

import EmojiShort from 'emoji-shortname-to-image';

// You can also add a second parameter, that will replace the emojishort class with your own
const emoji = new EmojiShort('https://your-cdn-url.com/with-trailing-slash/');

console.log(emoji.toImage(':croissant:'));

// Outputs:
// <img class="emojishort" src="https://your-cdn-url.com/with-trailing-slash/1f950.png" alt=":croissant:" title=":croissant:" />

console.log(emoji.toUnicode(':croissant:'));

// Outputs:
// 🥐

console.log(emoji.unicodeToImage('🥐'));

// Outputs:
// <img class="emojishort" src="https://your-cdn-url.com/with-trailing-slash/1f950.png" alt=":croissant:" title=":croissant:" />

The cdn url should point to a folder where the png's are located with a trailing /

🙌 Thanks

Powered by iamcal/emoji-data and emojione/emojione

FAQs

Package last updated on 17 Jul 2017

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