svelte-common 6.4.6 → 6.5.0
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/attribute.mjs +1 -1
- package/src/filter.mjs +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"c8": "^8.0.0",
|
|
54
54
|
"documentation": "^14.0.2",
|
|
55
55
|
"mf-styling": "^3.0.2",
|
|
56
|
-
"npm-pkgbuild": "^11.10.
|
|
56
|
+
"npm-pkgbuild": "^11.10.4",
|
|
57
57
|
"semantic-release": "^21.0.7",
|
|
58
58
|
"stylelint": "^15.10.2",
|
|
59
59
|
"stylelint-config-standard": "^34.0.0",
|
|
60
|
-
"svelte": "^4.1.
|
|
60
|
+
"svelte": "^4.1.1",
|
|
61
61
|
"testcafe": "^3.0.1",
|
|
62
|
-
"vite": "^4.4.
|
|
62
|
+
"vite": "^4.4.5"
|
|
63
63
|
},
|
|
64
64
|
"optionalDependencies": {
|
|
65
65
|
"mf-hosting-cloudflare": "^1.0.5",
|
package/src/attribute.mjs
CHANGED
|
@@ -143,7 +143,7 @@ export function setAttribute(object, name, value) {
|
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
145
|
* Deliver attribute value.
|
|
146
|
-
* The name may be a property path like 'a.b.c'
|
|
146
|
+
* The name may be a property path like 'a.b.c' or a[2]
|
|
147
147
|
* @param {Object} object
|
|
148
148
|
* @param {string} name
|
|
149
149
|
* @returns {any} value associated with the given property name
|
package/src/filter.mjs
CHANGED
|
@@ -17,6 +17,13 @@ function collectionOp(value, against, op) {
|
|
|
17
17
|
function allOp(value, against, op) {
|
|
18
18
|
switch (typeof value) {
|
|
19
19
|
case "object":
|
|
20
|
+
if (Array.isArray(value) || value instanceof Set) {
|
|
21
|
+
return collectionOp(value, against, op);
|
|
22
|
+
}
|
|
23
|
+
if (value instanceof Map) {
|
|
24
|
+
return collectionOp(value.keys(), against, op);
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
switch (typeof against) {
|
|
21
28
|
case "object":
|
|
22
29
|
if (value[Symbol.toPrimitive] && against[Symbol.toPrimitive]) {
|
|
@@ -49,10 +56,6 @@ function allOp(value, against, op) {
|
|
|
49
56
|
}
|
|
50
57
|
}
|
|
51
58
|
|
|
52
|
-
if (Array.isArray(value) || value instanceof Set) {
|
|
53
|
-
return collectionOp(value, against, op);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
59
|
return value.toString().match(against);
|
|
57
60
|
case "string":
|
|
58
61
|
switch (typeof against) {
|