![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
remark-emoji
Advanced tools
Package description
The remark-emoji npm package is a plugin for the remark processor that allows you to convert text-based emoji shortcodes into their corresponding Unicode emoji characters. This can be particularly useful for rendering markdown content with emojis in a more visually appealing way.
Convert Emoji Shortcodes to Unicode
This feature allows you to convert text-based emoji shortcodes (e.g., :heart:) into their corresponding Unicode emoji characters (❤️). The code sample demonstrates how to use the remark-emoji plugin with the remark processor to achieve this conversion.
const remark = require('remark');
const emoji = require('remark-emoji');
const markdown = 'I :heart: remark-emoji!';
remark()
.use(emoji)
.process(markdown, function (err, file) {
if (err) throw err;
console.log(String(file));
});
The markdown-it-emoji package is a plugin for the markdown-it parser that converts emoji shortcodes into Unicode emoji characters. It offers similar functionality to remark-emoji but is designed to work with the markdown-it ecosystem instead of remark.
The emojione package provides a comprehensive set of tools for working with emojis, including converting shortcodes to Unicode and vice versa. While it offers broader functionality beyond just markdown processing, it can be used in conjunction with markdown parsers to achieve similar results to remark-emoji.
The emoji-dictionary package provides a simple way to convert emoji shortcodes to Unicode characters and vice versa. It is a lightweight alternative that can be integrated into various text processing workflows, including markdown processing, to achieve similar functionality to remark-emoji.
Readme
This is a remark plugin to replace :emoji:
to real UTF-8 emojis in text.
You can find a demo in the following Codesandbox.
remark().use(emoji [, options]);
const remark = require('remark');
const emoji = require('remark-emoji');
const doc = 'Emojis in this text will be replaced: :dog: :+1:';
console.log(remark().use(emoji).process(doc).contents);
// => Emojis in this text will be replaced: 🐶 👍
options.padSpaceAfter
Setting to true
means that an extra whitespace is added after emoji.
This is useful when browser handle emojis with half character length and following character is hidden.
Default value is false
.
options.emoticon
Setting to true
means that emoticon shortcodes are supported (e.g. :-) will be replaced by 😃).
Default value is false
.
Distributed under the MIT License.
FAQs
Emoji transformer plugin for Remark
The npm package remark-emoji receives a total of 315,417 weekly downloads. As such, remark-emoji popularity was classified as popular.
We found that remark-emoji demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.