bare-script 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/value.js +2 -2
- package/package.json +1 -1
package/lib/value.js
CHANGED
|
@@ -203,8 +203,8 @@ export function valueCompare(left, right) {
|
|
|
203
203
|
return left.length < right.length ? -1 : (left.length === right.length ? 0 : 1);
|
|
204
204
|
} else if (leftType === 'object' && Object.getPrototypeOf(left) === Object.prototype &&
|
|
205
205
|
rightType === 'object' && Object.getPrototypeOf(right) === Object.prototype) {
|
|
206
|
-
const leftKeyValues = Object.entries(left).sort();
|
|
207
|
-
const rightKeyValues = Object.entries(right).sort();
|
|
206
|
+
const leftKeyValues = Object.entries(left).sort((kv1, kv2) => kv1[0] < kv2[0] ? -1 : 1);
|
|
207
|
+
const rightKeyValues = Object.entries(right).sort((kv1, kv2) => kv1[0] < kv2[0] ? -1 : 1);
|
|
208
208
|
const ixMax = Math.min(leftKeyValues.length, rightKeyValues.length);
|
|
209
209
|
let ix = 0;
|
|
210
210
|
while (ix < ixMax) {
|