svelte-common 4.22.14 → 4.22.15
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 +7 -7
- package/src/attribute.mjs +16 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-common",
|
|
3
|
-
"version": "4.22.
|
|
3
|
+
"version": "4.22.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,24 +34,24 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"svelte-command": "^1.1.39",
|
|
37
|
-
"svelte-entitlement": "^1.2.
|
|
37
|
+
"svelte-entitlement": "^1.2.50"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
41
41
|
"@semantic-release/exec": "^6.0.3",
|
|
42
42
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
43
|
-
"@sveltejs/vite-plugin-svelte": "^2.0
|
|
43
|
+
"@sveltejs/vite-plugin-svelte": "^2.1.0",
|
|
44
44
|
"ava": "^5.2.0",
|
|
45
45
|
"c8": "^7.13.0",
|
|
46
46
|
"documentation": "^14.0.1",
|
|
47
|
-
"mf-styling": "^1.7.
|
|
48
|
-
"npm-pkgbuild": "^11.7.
|
|
47
|
+
"mf-styling": "^1.7.54",
|
|
48
|
+
"npm-pkgbuild": "^11.7.16",
|
|
49
49
|
"semantic-release": "^21.0.1",
|
|
50
|
-
"stylelint": "^15.
|
|
50
|
+
"stylelint": "^15.6.0",
|
|
51
51
|
"stylelint-config-standard": "^33.0.0",
|
|
52
52
|
"svelte": "^3.58.0",
|
|
53
53
|
"testcafe": "^2.5.0",
|
|
54
|
-
"vite": "^4.
|
|
54
|
+
"vite": "^4.3.1"
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
57
|
"mf-hosting-cloudflare": "^1.0.5",
|
package/src/attribute.mjs
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} AttributeDefinition
|
|
3
|
+
*
|
|
4
|
+
* @property {string} type
|
|
5
|
+
* @property {boolean} writable
|
|
6
|
+
* @property {boolean} [private] should the value be shown
|
|
7
|
+
* @property {string} [depends] name of an attribute we depend on
|
|
8
|
+
* @property {string[]} additionalAttributes extra attributes that are present in case our attribute is set
|
|
9
|
+
* @property {string} description
|
|
10
|
+
* @property {any} [default] the default value
|
|
11
|
+
* @property {Function} [set] set the value
|
|
12
|
+
* @property {Function} [get] get the value can be used to calculate default values
|
|
13
|
+
* @property {string|string[]} [env] environment variable use to provide the value
|
|
14
|
+
*/
|
|
15
|
+
|
|
1
16
|
/**
|
|
2
17
|
* Split property path into tokens
|
|
3
18
|
* @param {string} string
|
|
@@ -114,7 +129,7 @@ export function setAttribute(object, name, value) {
|
|
|
114
129
|
* @returns {any} value associated with the given property name
|
|
115
130
|
*/
|
|
116
131
|
export function getAttribute(object, name) {
|
|
117
|
-
if (object
|
|
132
|
+
if (object?.[name] !== undefined) {
|
|
118
133
|
return object[name];
|
|
119
134
|
}
|
|
120
135
|
|