New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodebb-plugin-reddit

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-plugin-reddit - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

.editorconfig

23

library.js
(function(Reddit) {
"use strict";
var anchor = '<a href="http://reddit.com$1" target="_blank">$1</a>';
Reddit.parse = function(data, callback) {
var regex = /\B(\/[ru]\/\w+)/g;
Reddit.parsePost = function(data, callback) {
var postContent = data && data.postData && data.postData.content;
if (postContent && postContent.match(regex)) {
data.postData.content = postContent.replace(regex, anchor);
}
data.postData.content = parse(postContent);
callback(null, data);
};
Reddit.parseRaw = function(raw, callback) {
callback(null, parse(raw));
};
function parse(text) {
var regex = /\B(\/[ru]\/\w+)/g;
if (text && text.match(regex)) {
return text.replace(regex, anchor);
} else {
return text;
}
}
}(module.exports));
{
"name": "nodebb-plugin-reddit",
"version": "0.0.4",
"version": "0.0.5",
"description": "NodeBB Reddit Plugin",

@@ -5,0 +5,0 @@ "main": "library.js",

{
"id": "nodebb-plugin-reddit",
"name": "NodeBB Reddit Plugin",
"description": "NodeBB Plugin that will create links to subreddits in /r/ notation.",
"url": "https://github.com/Schamper/nodebb-plugin-reddit",
"library": "./library.js",
"hooks": [
{ "hook": "filter:parse.post", "method": "parse", "priority": 6 }
]
"id": "nodebb-plugin-reddit",
"name": "NodeBB Reddit Plugin",
"description": "NodeBB Plugin that will create links to subreddits in /r/ notation.",
"url": "https://github.com/Schamper/nodebb-plugin-reddit",
"library": "./library.js",
"hooks": [
{ "hook": "filter:parse.post", "method": "parsePost", "priority": 6 },
{ "hook": "filter:parse.raw", "method": "parseRaw", "priority": 6 }
]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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