@dnd-kit/state 0.0.1 → 0.0.2-beta-20240610193339
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/index.js +11 -3
- package/dist/index.mjs +11 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -56,11 +56,19 @@ function deepEqual(a, b) {
|
|
|
56
56
|
if (a === b) {
|
|
57
57
|
return true;
|
|
58
58
|
}
|
|
59
|
-
if (
|
|
60
|
-
if (
|
|
59
|
+
if (a instanceof Set && b instanceof Set) {
|
|
60
|
+
if (a.size !== b.size) {
|
|
61
61
|
return false;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
for (const value of a) {
|
|
64
|
+
if (!b.has(value)) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
if (Array.isArray(a)) {
|
|
71
|
+
if (!Array.isArray(b) || a.length !== b.length) {
|
|
64
72
|
return false;
|
|
65
73
|
}
|
|
66
74
|
const hasDifferentValues = a.some(
|
package/dist/index.mjs
CHANGED
|
@@ -31,11 +31,19 @@ function deepEqual(a, b) {
|
|
|
31
31
|
if (a === b) {
|
|
32
32
|
return true;
|
|
33
33
|
}
|
|
34
|
-
if (
|
|
35
|
-
if (
|
|
34
|
+
if (a instanceof Set && b instanceof Set) {
|
|
35
|
+
if (a.size !== b.size) {
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
for (const value of a) {
|
|
39
|
+
if (!b.has(value)) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
if (Array.isArray(a)) {
|
|
46
|
+
if (!Array.isArray(b) || a.length !== b.length) {
|
|
39
47
|
return false;
|
|
40
48
|
}
|
|
41
49
|
const hasDifferentValues = a.some(
|