Comparing version 0.4.1 to 0.4.2
@@ -91,4 +91,6 @@ /* Minimal Couch In Node | ||
if(opts.body) { | ||
if(typeof opts.body === "object") { req.body = JSON.stringify(opts.body); } | ||
else { req.body = opts.body; } // String or binary | ||
if (Buffer.isBuffer(opts.body)) { | ||
req.body = opts.body; // Raw data | ||
} | ||
else { req.body = JSON.stringify(opts.body); } // JSON | ||
} | ||
@@ -103,3 +105,3 @@ req.uri = url + (_.isEmpty(params) ? "" : "?" + qs.stringify(params)); | ||
status_code = h.statusCode; | ||
parsed = JSON.parse(b); | ||
try { parsed = JSON.parse(b); } catch (err) { parsed = b; } | ||
if (status_code === 200 || status_code === 201 || status_code === 202) { | ||
@@ -106,0 +108,0 @@ callback(null,rh,parsed); |
{ "name": "nano" | ||
, "description": "NanoCouch is a minimalistic driver for CouchDB built on mikeals/request" | ||
, "homepage": "http://github.com/dscape/nano" | ||
, "version": "0.4.1" | ||
, "version": "0.4.2" | ||
, "author": "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" | ||
@@ -6,0 +6,0 @@ , "keywords": ["CouchDB", "data", "request", "json", "nosql", "micro", "nano"] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22642
487