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

redddit

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redddit - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

25

index.js

@@ -52,2 +52,27 @@ const needle = require('needle');

})
}
exports.search = (query,cb) => {
if (!query) {
console.error("query param required");
return false;
}
var opt = { headers: {
"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Encoding":"gzip, deflate, br",
"Connection":"keep-alive",
"DNT":"1",
"Host":"www.reddit.com",
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0",
}}
needle.get("https://reddit.com/search.json?q="+encodeURI(query)+"&limit=100",opt,async function(err,resp,body) {
if (err) {
var body = null;
cb(err,body);
} else {
var err = null;
var res = body.data.children;
cb(err,res)
}
})
}

2

package.json
{
"name": "redddit",
"version": "1.0.1",
"version": "1.0.2",
"description": "reddit api without any authentication!",

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

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