svelte-common 6.4.4 → 6.4.5
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/package.json +1 -1
- package/src/filter.mjs +4 -16
package/package.json
CHANGED
package/src/filter.mjs
CHANGED
|
@@ -15,21 +15,6 @@ function collectionOp(value, against, op) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function allOp(value, against, op) {
|
|
18
|
-
switch (typeof against) {
|
|
19
|
-
case "object":
|
|
20
|
-
if (against instanceof Date) {
|
|
21
|
-
switch (typeof value) {
|
|
22
|
-
case "object":
|
|
23
|
-
if (value instanceof Date) {
|
|
24
|
-
return dateOp(value, against, op);
|
|
25
|
-
}
|
|
26
|
-
break;
|
|
27
|
-
case "string":
|
|
28
|
-
return dateOp(new Date(value), against, op);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
18
|
switch (typeof value) {
|
|
34
19
|
case "object":
|
|
35
20
|
if (value instanceof Date) {
|
|
@@ -54,6 +39,10 @@ function allOp(value, against, op) {
|
|
|
54
39
|
case "number":
|
|
55
40
|
return numberOp(value, against, op);
|
|
56
41
|
case "object":
|
|
42
|
+
if (against instanceof Date) {
|
|
43
|
+
return dateOp(new Date(value), against, op);
|
|
44
|
+
}
|
|
45
|
+
|
|
57
46
|
if (against instanceof RegExp) {
|
|
58
47
|
return against.test(value);
|
|
59
48
|
}
|
|
@@ -65,7 +54,6 @@ function allOp(value, against, op) {
|
|
|
65
54
|
if (against instanceof RegExp) {
|
|
66
55
|
return against.test(value);
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
return numberOp(value, against, op);
|
|
70
58
|
case "boolean":
|
|
71
59
|
return value == against;
|