New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

encode-emojis

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

encode-emojis

A javascript library that encodes emojis (only emojis!) to HTML entities.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by166.67%
Maintainers
1
Weekly downloads
 
Created
Source

Encode Emojis

npm Package Version License MIT GitHub Repo Native Typescript Support Coveralls Coverage GitHub Workflow Status

A javascript library that encodes emojis (only emojis!) to HTML entities.


Installation

This library is published to npm registry as encode-emojis.

You can install it:

# with npm
npm install --save encode-emojis

# with yarn
yarn add encode-emojis

ℹ️ HINT: This library is a pure ESM package. (You may want to read this.)

Usage

import { encodeEmojis } from 'encode-emojis';

let text = '<strong>Hello!</strong> 👋';

text = encodeEmojis(text);

console.log(text); // -> '<strong>Hello!</strong> &#x1f44b;'

Why?

Unfortunately, I am forced to use MS Teams for work, which - although it was working fine since forever - recently decided to fail on webhook event data that contains emojis.

But as my webhook event data contains not only emojis but also HTML, I needed to convert only emojis. So here we go…

License

MIT © Simon Lepel

FAQs

Package last updated on 03 May 2023

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