Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couchdb-resp-completer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchdb-resp-completer - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

13

index.js

@@ -31,3 +31,3 @@ /*

if (Object.prototype.toString.call(resp) !== "[object Object]") {
resp = {body: ""};
resp = {};
}

@@ -61,7 +61,7 @@ //check for keys that shouldn't be in the resp object

resp.headers["Content-Type"] = resp.headers["Content-Type"] || contentType;
if (resp.json) {
if (typeof resp.json !== 'undefined') {
resp.body = JSON.stringify(resp.json);
resp.headers["Content-Type"] = resp.headers["Content-Type"] || "application/json";
}
if (resp.base64) {
if (typeof resp.base64 !== 'undefined') {
resp.headers["Content-Type"] = resp.headers["Content-Type"] || "application/binary";

@@ -72,3 +72,10 @@ }

//the user isn't allowed to set the etag header
delete resp.headers.Etag;
if (typeof resp.body === "undefined" && typeof resp.base64 === "undefined") {
resp.body = "";
}
return resp;
};
{
"name": "couchdb-resp-completer",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "description": "Builds a complete CouchDB-like response object from a very marginal one. (Can be just a string at first.)",

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