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 - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

35

index.js

@@ -44,3 +44,3 @@ 'use strict';

MAX_GEMOJI_PART_COUNT = 4;
MAX_GEMOJI_PART_COUNT = 12;

@@ -141,3 +141,3 @@ /**

while (siblingIndex--) {
if ((index - siblingIndex) >= MAX_GEMOJI_PART_COUNT) {
if ((index - siblingIndex) > MAX_GEMOJI_PART_COUNT) {
return;

@@ -235,4 +235,2 @@ }

function attach(parser) {
var paragraphPlugins;
if (!parser || !parser.parse) {

@@ -255,29 +253,4 @@ throw new Error(

parser.use('tokenizeSentence', emojiModifier);
/**
* Adding the paragraph modifier is a bit non-standard.
* Reasoning is first of all, to not worry about white
* space nodes between sentences: at this stage,
* paragraph only consists of `SentenceNode`s.
* Additionally, adding it before all other modifiers
* makes sure that sentences starting with a lower case
* letter still get matched correctly:
*
* Alfred! :+1: bertrand
*
* ...is correctly classified as one sentence, and:
*
* Alfred! :+1: Bertrand
*
* ...is correctly classified as `SentenceNode`
* (`Alfred! :+1:`), `WhiteSpaceNode` and
* `SentenceNode` (`Bertrand`).
*/
paragraphPlugins = parser.tokenizeParagraphPlugins;
if (paragraphPlugins.indexOf(affixEmojiModifier) === -1) {
parser.tokenizeParagraphPlugins.unshift(affixEmojiModifier);
}
parser.useFirst('tokenizeSentence', emojiModifier);
parser.useFirst('tokenizeParagraph', affixEmojiModifier);
}

@@ -284,0 +257,0 @@

2

package.json
{
"name": "nlcst-emoji-modifier",
"version": "0.0.1",
"version": "0.1.0",
"description": "Emoji in NLCST",

@@ -5,0 +5,0 @@ "license": "MIT",

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