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

retext-emoji

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retext-emoji

Emoji, gemoji, and emoticons with retext

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-22.67%
Maintainers
1
Weekly downloads
 
Created
Source

retext-emoji Build Status Coverage Status

Emoji, gemoji, and emoticons in retext.

Installation

npm:

npm install retext-emoji

retext-emoji is also available as an AMD, CommonJS, and globals module, uncompressed and compressed.

Usage

Dependencies:

var retext = require('retext');
var emoji = require('retext-emoji');

Process:

var file = retext()
    .use(emoji, {convert: 'encode'})
    .process('I’m going to bed. :zzz:');

Yields:

I’m going to bed. 💤

API

retext().use(emoji[, options])

Emoji, gemoji, and emoticons in retext.

options
  • convert ('encode' or 'decode', optional) — When encode, converts short-codes and emoticons to their unicode equivalent (:heart: and <3 to ❤️); When decode, converts unicode emoji and emoticons to their short-code equivalent (❤️ and <3 to :heart:).
Returns

string.

EmoticonNode

retext-emoji adds a new node to NLCST: Emoticon (Symbol).

Whether emoji (❤️), emoticon (<3), or gemoji (:heart:), all are classified as EmoticonNodes.

interface Emoticon < Symbol {
    type: "EmoticonNode";
    data: EmoticonData;
}

interface EmoticonData {
    names: [string];
    description: string | null;
    tags: [string];
}

Support

retext-emoji supports every wooorm/gemoji and every wooorm/emoticon.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 22 Jun 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