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

http-get-json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-get-json - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

18

index.js
var http = require("http");
var httpGetJSON = (url, cb) => {
http.get(url, res => {
let result = [];
res.setEncoding('utf8')
.on('data', (chunk) => result.push(chunk))
var httpGetJSON = ( url, cb ) =>
http.get( url, res => ( chunks =>
res.setEncoding( "utf8" )
.on('data', chunk => chunks.push(chunk))
.on('end', () => {
try {
cb(null, JSON.parse(result.join('')));
cb(null, JSON.parse( chunks.join('') ));
} catch (err) { cb(err); }
})
}).on('error', cb);
};
}))([]))
.on('error', cb);
module.exports = httpGetJSON;
module.exports = httpGetJSON;
{
"name": "http-get-json",
"version": "1.0.0",
"version": "1.0.1",
"description": "Give me the JSON",

@@ -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