Comparing version 0.1.1 to 0.1.2
@@ -6,2 +6,3 @@ "use strict"; | ||
// TODO Oplog events : https://github.com/hiddentao/robe/blob/master/src/oplog.js | ||
@@ -8,0 +9,0 @@ class Client { |
@@ -328,3 +328,17 @@ "use strict"; | ||
if (value && typeof value.toObject === 'function') { | ||
if (_.isArray(value)) { | ||
return value.map(value => { | ||
if (value && typeof value.toObject === 'function') { | ||
return value.toObject.call(value, includeSubDocument, depth + 1); | ||
} | ||
else if (value && typeof value.toString === 'function') { | ||
var str = value.toString(); | ||
if (str !== '[object Object]') { | ||
return str; | ||
} | ||
} | ||
return value; | ||
}); | ||
} | ||
else if (value && typeof value.toObject === 'function') { | ||
return value.toObject.call(value, includeSubDocument, depth + 1); | ||
@@ -533,3 +547,17 @@ } | ||
return this.map((item) => { | ||
if (item && typeof item.toObject === 'function') { | ||
if (_.isArray(item)) { | ||
return value.map(value => { | ||
if (item && typeof item.toObject === 'function') { | ||
return item.toObject.call(item, includeSubDocument, depth + 1); | ||
} | ||
else if (item && typeof item.toString === 'function') { | ||
var str = item.toString(); | ||
if (str !== '[object Object]') { | ||
return item.toString(); | ||
} | ||
} | ||
return item; | ||
}); | ||
} | ||
else if (item && typeof item.toObject === 'function') { | ||
return item.toObject.call(item, includeSubDocument, depth + 1); | ||
@@ -536,0 +564,0 @@ } |
{ | ||
"name": "sinaps-odm", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Sinaps ODM is a object document model for MongoDB-like databases.", | ||
@@ -5,0 +5,0 @@ "main": "main.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
70868
2243