@wavy/fn 0.0.39 → 0.0.40
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/dist/main.cjs +7 -7
- package/dist/main.js +7 -7
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -684,16 +684,16 @@ function isPromise(value) {
|
|
|
684
684
|
return !!value && (typeof value === "object" || typeof value === "function") && "then" in value && typeof value.then === "function";
|
|
685
685
|
}
|
|
686
686
|
function arrayEquals(...args) {
|
|
687
|
-
if (!args) return false;
|
|
688
|
-
if (args.length === 0) return false;
|
|
687
|
+
if (!args || args.length === 0) return false;
|
|
689
688
|
if (args.length === 1) return true;
|
|
690
689
|
return args.every((array, i) => {
|
|
691
690
|
const compareTo = args[i - 1] ?? args[i + 1];
|
|
692
|
-
|
|
693
|
-
(
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
691
|
+
return array.length === compareTo.length && array.every((item, idx) => {
|
|
692
|
+
if (Array.isArray(item)) {
|
|
693
|
+
args.push(item);
|
|
694
|
+
return true;
|
|
695
|
+
}
|
|
696
|
+
return typeof item === typeof compareTo[idx] && (typeof item === "object" ? findChanges(item, compareTo[idx]).length < 1 : JSON.stringify(item).trim().toLowerCase() === JSON.stringify(compareTo[idx]).trim().toLowerCase());
|
|
697
697
|
});
|
|
698
698
|
});
|
|
699
699
|
}
|
package/dist/main.js
CHANGED
|
@@ -573,16 +573,16 @@ function isPromise(value) {
|
|
|
573
573
|
return !!value && (typeof value === "object" || typeof value === "function") && "then" in value && typeof value.then === "function";
|
|
574
574
|
}
|
|
575
575
|
function arrayEquals(...args) {
|
|
576
|
-
if (!args) return false;
|
|
577
|
-
if (args.length === 0) return false;
|
|
576
|
+
if (!args || args.length === 0) return false;
|
|
578
577
|
if (args.length === 1) return true;
|
|
579
578
|
return args.every((array, i) => {
|
|
580
579
|
const compareTo = args[i - 1] ?? args[i + 1];
|
|
581
|
-
|
|
582
|
-
(
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
580
|
+
return array.length === compareTo.length && array.every((item, idx) => {
|
|
581
|
+
if (Array.isArray(item)) {
|
|
582
|
+
args.push(item);
|
|
583
|
+
return true;
|
|
584
|
+
}
|
|
585
|
+
return typeof item === typeof compareTo[idx] && (typeof item === "object" ? findChanges(item, compareTo[idx]).length < 1 : JSON.stringify(item).trim().toLowerCase() === JSON.stringify(compareTo[idx]).trim().toLowerCase());
|
|
586
586
|
});
|
|
587
587
|
});
|
|
588
588
|
}
|