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

jstor-s3

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstor-s3 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

23

jstor-s3.js

@@ -75,11 +75,16 @@ //documentation:read a json file from s3

async get(key){
const getParams = getCmdParams(key);
const cmd = new GetObjectCommand(getParams);
const s3Resp = await s3Client.send(cmd);
const s3Stream = s3Resp.Body;
if(s3Stream instanceof Readable){
const data = await readStream(s3Stream);
return data;
}else{
throw new Error(`jstor s3: No readable stream found for ${key}`) ;
try{
const getParams = getCmdParams(key);
const cmd = new GetObjectCommand(getParams);
const s3Resp = await s3Client.send(cmd);
const s3Stream = s3Resp.Body;
if(s3Stream instanceof Readable){
const data = await readStream(s3Stream);
return data;
}else{
throw new Error(`jstor s3: No readable stream found for ${key}`) ;
}
}catch(e){
//if a key does not exist S3 will return an error message... Where jstor will just indicate File.exists = false;
return;
}

@@ -86,0 +91,0 @@ },

{
"name": "jstor-s3",
"version": "1.0.0",
"version": "1.0.1",
"description": "jstor strategy for AWS S3",

@@ -5,0 +5,0 @@ "main": "jstor-s3.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