Gathering detailed insights and metrics for @gerhobbelt/markdown-it-emoji
Gathering detailed insights and metrics for @gerhobbelt/markdown-it-emoji
npm install @gerhobbelt/markdown-it-emoji
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (86.1%)
Makefile (13.9%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
4,713
Last Day
1
Last Week
6
Last Month
63
Last Year
522
MIT License
3 Stars
96 Commits
1 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Feb 07, 2022
Latest Version
2.0.0-12
Package Id
@gerhobbelt/markdown-it-emoji@2.0.0-12
Unpacked Size
104.85 kB
Size
29.67 kB
File Count
26
NPM Version
7.19.1
Node Version
16.4.1
Cumulative downloads
Total Downloads
Last Day
-50%
1
Compared to previous day
Last Week
-60%
6
Compared to previous week
Last Month
320%
63
Compared to previous month
Last Year
-36.3%
522
Compared to previous year
Plugin for markdown-it markdown parser, adding emoji & emoticon syntax support.
v1.+ requires markdown-it
v4.+, see changelog.
Three versions:
Also supports emoticons shortcuts like :)
, :-(
, and others. See the full list in the link above.
node.js, browser:
1npm install @gerhobbelt/markdown-it-emoji --save
1var md = require('@gerhobbelt/markdown-it')(); 2var emoji = require('@gerhobbelt/markdown-it-emoji'); 3// Or for light version 4// var emoji = require('@gerhobbelt/markdown-it-emoji/light'); 5 6md.use(emoji [, options]);
Options are not mandatory:
{ name1: char1, name2: char2, ... }
{ "smile": [ ":)", ":-)" ], "laughing": ":D" }
Differences in browser. If you load the script directly into the page without
using a package system, the module will add itself globally with the name markdownitEmoji
.
Init code will look a bit different in this case:
1var md = window.markdownit().use(window.markdownitEmoji);
By default, emojis are rendered as appropriate unicode chars. But you can change the renderer function as you wish.
Render as span blocks (for example, to use a custom iconic font):
1// ... 2// initialize 3 4md.renderer.rules.emoji = function(token, idx) { 5 return '<span class="emoji emoji_' + token[idx].markup + '"></span>'; 6};
Or use twemoji:
1// ... 2// initialize 3 4var twemoji = require('twemoji') 5 6md.renderer.rules.emoji = function(token, idx) { 7 return twemoji.parse(token[idx].content); 8};
NB 1. Read twemoji docs! In case you need more options to change image size & type.
NB 2. When using twemoji you can make image height match the line height with this style:
1.emoji { 2 height: 1.2em; 3}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More