svelte-common 6.5.5 → 6.5.6
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 +16 -0
package/package.json
CHANGED
package/src/filter.mjs
CHANGED
|
@@ -71,6 +71,14 @@ function allOp(value, against, op) {
|
|
|
71
71
|
return against.test(value);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
if (against instanceof Map) {
|
|
75
|
+
for (const [k,v] of against) {
|
|
76
|
+
if (value.match(k) || value.match(v)) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
if (Array.isArray(against) || against instanceof Set) {
|
|
75
83
|
for (const i of against) {
|
|
76
84
|
if (value.match(i)) {
|
|
@@ -87,6 +95,14 @@ function allOp(value, against, op) {
|
|
|
87
95
|
return against.test(value);
|
|
88
96
|
}
|
|
89
97
|
|
|
98
|
+
if (against instanceof Map) {
|
|
99
|
+
for (const [k,v] of against) {
|
|
100
|
+
if (numberOp(value, k, op) || numberOp(value, v, op)) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
90
106
|
if (Array.isArray(against) || against instanceof Set) {
|
|
91
107
|
for (const i of against) {
|
|
92
108
|
if (numberOp(value, i, op)) {
|