
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
nlcst-emoji-modifier
Advanced tools
nlcst utility to classify emoji and gemoji shortcodes as EmoticonNode
s.
This utility searches for emoji (π
) and gemoji shortcodes (:+1:
) and turns
them into separate nodes.
This package is a tiny utility that helps when dealing with emoji and gemoji in
natural language.
The plugin retext-emoji
wraps this utility and others at a
higher-level (easier) abstraction.
This package is ESM only. In Node.js (version 16+), install with npm:
npm install nlcst-emoji-modifier
In Deno with esm.sh
:
import {emojiModifier} from 'https://esm.sh/nlcst-emoji-modifier@6'
In browsers with esm.sh
:
<script type="module">
import {emojiModifier} from 'https://esm.sh/nlcst-emoji-modifier@6?bundle'
</script>
import {emojiModifier} from 'nlcst-emoji-modifier'
import {ParseEnglish} from 'parse-english'
import {inspect} from 'unist-util-inspect'
const english = new ParseEnglish()
english.tokenizeSentencePlugins.unshift(emojiModifier)
console.log(inspect(english.parse('Itβs raining :cat:s and :dog:s.')))
Yields:
RootNode[1] (1:1-1:32, 0-31)
ββ ParagraphNode[1] (1:1-1:32, 0-31)
ββ SentenceNode[11] (1:1-1:32, 0-31)
ββ WordNode[3] (1:1-1:5, 0-4)
β ββ TextNode: "It" (1:1-1:3, 0-2)
β ββ PunctuationNode: "β" (1:3-1:4, 2-3)
β ββ TextNode: "s" (1:4-1:5, 3-4)
ββ WhiteSpaceNode: " " (1:5-1:6, 4-5)
ββ WordNode[1] (1:6-1:13, 5-12)
β ββ TextNode: "raining" (1:6-1:13, 5-12)
ββ WhiteSpaceNode: " " (1:13-1:14, 12-13)
ββ EmoticonNode: ":cat:" (1:14-1:19, 13-18)
ββ WordNode[1] (1:19-1:20, 18-19)
β ββ TextNode: "s" (1:19-1:20, 18-19)
ββ WhiteSpaceNode: " " (1:20-1:21, 19-20)
ββ WordNode[1] (1:21-1:24, 20-23)
β ββ TextNode: "and" (1:21-1:24, 20-23)
ββ WhiteSpaceNode: " " (1:24-1:25, 23-24)
ββ EmoticonNode: ":dog:" (1:25-1:30, 24-29)
ββ WordNode[2] (1:30-1:32, 29-31)
ββ TextNode: "s" (1:30-1:31, 29-30)
ββ PunctuationNode: "." (1:31-1:32, 30-31)
This package exports the identifier emojiModifier
.
There is no default export.
emojiModifier(node)
Classify emoji (π) and Gemoji (GitHub emoji, :+1:) in node
as Emoticon
s.
See Emoticon
in nlcst-emoticon-modifier
.
node
(Sentence
)
β sentence to transformNothing (undefined
).
This package is fully typed with TypeScript. It exports no additional types
See Emoticon
in nlcst-emoticon-modifier
on
how to register it in TypeScript.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, nlcst-emoji-modifier@^6
,
compatible with Node.js 16.
nlcst-affix-emoticon-modifier
β merge affix emoticons into the previous sentence in nlcstnlcst-emoticon-modifier
β support emoticonsSee contributing.md
in syntax-tree/.github
for
ways to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
MIT Β© Titus Wormer
FAQs
nlcst utility to support emoji
The npm package nlcst-emoji-modifier receives a total of 10,886 weekly downloads. As such, nlcst-emoji-modifier popularity was classified as popular.
We found that nlcst-emoji-modifier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socketβs AI scanner detected the supply chain attack and flagged the malware.
Security News
CISAβs 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.