Socket
Socket
Sign inDemoInstall

remark-emoji

Package Overview
Dependencies
5
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 2.0.0

20

index_test.js

@@ -9,11 +9,7 @@ const assert = require('assert');

const compiler = remark().use(github).use(headings).use(slug).use(emoji);
const padded = remark().use(github).use(headings).use(slug).use(emoji, {padSpaceAfter: true});
function process(contents) {
return new Promise((resolve, reject) => {
compiler.process(contents, (err, result) => {
if (err) {
return reject(err);
}
resolve(result.contents);
});
return compiler.process(contents).then(function (file) {
return file.contents;
});

@@ -23,10 +19,4 @@ }

function processPad(contents) {
const compiler = remark().use(github).use(headings).use(slug).use(emoji, {padSpaceAfter: true});
return new Promise((resolve, reject) => {
compiler.process(contents, (err, result) => {
if (err) {
return reject(err);
}
resolve(result.contents);
});
return padded.process(contents).then(function (file) {
return file.contents;
});

@@ -33,0 +23,0 @@ }

@@ -6,3 +6,3 @@ const visit = require('unist-util-visit');

function plugin(_, settings) {
function plugin(settings) {
const pad = !!(settings || {}).padSpaceAfter;

@@ -9,0 +9,0 @@

{
"name": "remark-emoji",
"version": "1.1.1",
"version": "2.0.0",
"description": "Emoji transformer plugin for Remark",

@@ -29,5 +29,5 @@ "main": "index.js",

"mocha": "^3.1.0",
"remark": "^6.0.1",
"remark": "^7.0.0",
"remark-autolink-headings": "^4.0.0",
"remark-github": "^6.0.1",
"remark-github": "^7.0.0",
"remark-slug": "^4.2.2"

@@ -34,0 +34,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc