svelte-common 6.6.12 → 6.6.13
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 +4 -4
- package/src/filter.mjs +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-common",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
"svelte-entitlement": "^1.2.65"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@semantic-release/commit-analyzer": "^
|
|
48
|
+
"@semantic-release/commit-analyzer": "^11.0.0",
|
|
49
49
|
"@semantic-release/exec": "^6.0.3",
|
|
50
|
-
"@semantic-release/release-notes-generator": "^
|
|
50
|
+
"@semantic-release/release-notes-generator": "^12.0.0",
|
|
51
51
|
"@sveltejs/vite-plugin-svelte": "^2.4.6",
|
|
52
52
|
"ava": "^5.3.1",
|
|
53
53
|
"c8": "^8.0.1",
|
|
54
54
|
"documentation": "^14.0.2",
|
|
55
55
|
"mf-styling": "^3.0.5",
|
|
56
56
|
"npm-pkgbuild": "^12.1.1",
|
|
57
|
-
"semantic-release": "^
|
|
57
|
+
"semantic-release": "^22.0.0",
|
|
58
58
|
"stylelint": "^15.10.3",
|
|
59
59
|
"stylelint-config-standard": "^34.0.0",
|
|
60
60
|
"svelte": "^4.2.0",
|
package/src/filter.mjs
CHANGED
|
@@ -16,7 +16,7 @@ function collectionOp(value, against, op) {
|
|
|
16
16
|
|
|
17
17
|
function allOp(value, against, op) {
|
|
18
18
|
switch (typeof value) {
|
|
19
|
-
case "object":
|
|
19
|
+
case "object":
|
|
20
20
|
if (value instanceof Map) {
|
|
21
21
|
return collectionOp(value.keys(), against, op);
|
|
22
22
|
}
|
|
@@ -50,10 +50,20 @@ function allOp(value, against, op) {
|
|
|
50
50
|
if (value instanceof Date) {
|
|
51
51
|
return dateOp(value, new Date(against), op);
|
|
52
52
|
}
|
|
53
|
+
break;
|
|
54
|
+
case "boolean":
|
|
55
|
+
return numberOp(value ? true : false, against, op);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (against instanceof RegExp) {
|
|
59
|
+
return against.test(value.toString());
|
|
53
60
|
}
|
|
61
|
+
|
|
54
62
|
return value.toString().match(against);
|
|
55
63
|
case "string":
|
|
56
64
|
switch (typeof against) {
|
|
65
|
+
case "boolean":
|
|
66
|
+
return numberOp(value.length !== 0, against, op);
|
|
57
67
|
case "bigint":
|
|
58
68
|
case "number":
|
|
59
69
|
return numberOp(value, against, op);
|