simple-odata-server
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -272,8 +272,14 @@ /*! | ||
if (propDef.type === "Edm.Binary") { | ||
if (doc[prop] !== 'Buffer' && !doc[prop].length) { | ||
//nedb returns object instead of buffer on node 4 | ||
//nedb returns object instead of buffer on node 4 | ||
if (!Buffer.isBuffer(doc[prop]) && !doc[prop].length) { | ||
var obj = doc[prop]; | ||
obj = obj.data || obj; | ||
doc[prop] = Object.keys(obj).map(function (key) {return obj[key]; }); | ||
} | ||
//unwrap mongo style buffers | ||
if (doc[prop]._bsontype === "Binary") { | ||
doc[prop] = doc[prop].buffer; | ||
} | ||
doc[prop] = new Buffer(doc[prop]).toString("base64"); | ||
@@ -280,0 +286,0 @@ } |
{ | ||
"name": "simple-odata-server", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "OData server with adapter for mongodb and nedb", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
63654
1623