Comparing version 2.3.3 to 3.0.0-rc0
@@ -0,1 +1,6 @@ | ||
3.0.0-rc0 / 2017-12-06 | ||
====================== | ||
* BREAKING CHANGE: remove support for node < 4 | ||
* BREAKING CHANGE: remove support for retainKeyOrder, will always be true by default re: Automattic/mongoose#2749 | ||
2.3.3 / 2017-11-19 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -66,35 +66,17 @@ 'use strict'; | ||
var cloneObject = exports.cloneObject = function cloneObject (obj, options) { | ||
var retainKeyOrder = options && options.retainKeyOrder | ||
, minimize = options && options.minimize | ||
, ret = {} | ||
, hasKeys | ||
, keys | ||
, val | ||
, k | ||
, i | ||
var minimize = options && options.minimize; | ||
var ret = {}; | ||
var hasKeys; | ||
var keys; | ||
var val; | ||
var k; | ||
var i; | ||
if (retainKeyOrder) { | ||
for (k in obj) { | ||
val = clone(obj[k], options); | ||
for (k in obj) { | ||
val = clone(obj[k], options); | ||
if (!minimize || ('undefined' !== typeof val)) { | ||
hasKeys || (hasKeys = true); | ||
ret[k] = val; | ||
} | ||
if (!minimize || ('undefined' !== typeof val)) { | ||
hasKeys || (hasKeys = true); | ||
ret[k] = val; | ||
} | ||
} else { | ||
// faster | ||
keys = Object.keys(obj); | ||
i = keys.length; | ||
while (i--) { | ||
k = keys[i]; | ||
val = clone(obj[k], options); | ||
if (!minimize || ('undefined' !== typeof val)) { | ||
if (!hasKeys) hasKeys = true; | ||
ret[k] = val; | ||
} | ||
} | ||
} | ||
@@ -186,5 +168,3 @@ | ||
if ('undefined' === typeof to[key]) { | ||
// make sure to retain key order here because of a bug handling the $each | ||
// operator in mongodb 2.4.4 | ||
to[key] = clone(from[key], { retainKeyOrder : 1}); | ||
to[key] = clone(from[key]); | ||
} else { | ||
@@ -194,5 +174,3 @@ if (exports.isObject(from[key])) { | ||
} else { | ||
// make sure to retain key order here because of a bug handling the | ||
// $each operator in mongodb 2.4.4 | ||
to[key] = clone(from[key], { retainKeyOrder : 1}); | ||
to[key] = clone(from[key]); | ||
} | ||
@@ -199,0 +177,0 @@ } |
{ | ||
"name": "mquery", | ||
"version": "2.3.3", | ||
"version": "3.0.0-rc0", | ||
"description": "Expressive query building for MongoDB", | ||
@@ -5,0 +5,0 @@ "main": "lib/mquery.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
227071
5971
1