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

nlcst-emoji-modifier

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlcst-emoji-modifier

Emoji in NLCST

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
decreased by-25.83%
Maintainers
1
Weekly downloads
 
Created
Source

nlcst-emoji-modifier Build Status Coverage Status

NLCST modifier to classify unicode emoji and Github emoji (gemoji) short-codes as EmoticonNodes.

Implemented by retext-emoji, but separated for use by standalone (non-retext) processing.

Installation

npm:

npm install nlcst-emoji-modifier

nlcst-emoji-modifier is also available for bower, component, and duo, and as an AMD, CommonJS, and globals module, uncompressed and compressed.

Usage

var modifier = require('nlcst-emoji-modifier');
var inspect = require('unist-util-inspect');
var english = require('parse-english')();

english.useFirst('tokenizeSentence', modifier);

console.log(inspect(english.parse('It\'s raining :cat:s and :dog:s.')));

Yields:

RootNode[1]
└─ ParagraphNode[1]
   └─ SentenceNode[10]
      ├─ WordNode[1]
      │  └─ TextNode: 'Who'
      ├─ WhiteSpaceNode: ' '
      ├─ WordNode[3]
      │  ├─ TextNode: 'doesn'
      │  ├─ PunctuationNode: '’'
      │  └─ TextNode: 't'
      ├─ WhiteSpaceNode: ' '
      ├─ WordNode[1]
      │  └─ TextNode: 'like'
      ├─ WhiteSpaceNode: ' '
      ├─ WordNode[1]
      │  └─ TextNode: 'Gemoji'
      ├─ WhiteSpaceNode: ' '
      ├─ EmoticonNode: ':+1:'
      └─ PunctuationNode: '?'

API

emojiModifier(sentence)

Classify unicode emoji and Github emoji (gemoji) short-codes as EmoticonNodes.

Parameters

  • sentence (NLCSTSentenceNode) — Node with children.

Throws

  • Error — When not given a parent node.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 30 Aug 2015

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