svelte-common 4.22.16 → 4.22.17

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Svelte v3](https://img.shields.io/badge/svelte-v3-orange.svg)](https://svelte.dev)
2
2
  [![npm](https://img.shields.io/npm/v/svelte-common.svg)](https://www.npmjs.com/package/svelte-common)
3
3
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
4
- [![Open Bundle](https://bundlejs.com/badge-light.svg)](https://bundlejs.com/?q=svelte-common)
4
+ [![bundlejs](https://deno.bundlejs.com/?q=svelte-common\&badge=detailed)](https://bundlejs.com/?q=svelte-common)
5
5
  [![downloads](http://img.shields.io/npm/dm/svelte-common.svg?style=flat-square)](https://npmjs.org/package/svelte-common)
6
6
  [![GitHub Issues](https://img.shields.io/github/issues/arlac77/svelte-common.svg?style=flat-square)](https://github.com/arlac77/svelte-common/issues)
7
7
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Farlac77%2Fsvelte-common%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/arlac77/svelte-common/goto)
@@ -118,8 +118,8 @@ Generate filter function.
118
118
 
119
119
  ### Parameters
120
120
 
121
- * `filterBy` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
122
- * `getters` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
121
+ * `filterBy` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
122
+ * `getters` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
123
123
 
124
124
  Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
125
125
 
@@ -152,10 +152,8 @@ Synchronizes store value with the nodes "aria-sort" attribute.
152
152
 
153
153
  ### Parameters
154
154
 
155
- * `th`  
156
- * `store`  
157
- * `the` **[Node](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)** header node
158
- * `to` **WritableStore** keep in sync with sorting properties
155
+ * `th` **[Node](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)** the header node
156
+ * `store` **WritableStore** keep in sync with sorting properties
159
157
 
160
158
  ## sorter
161
159
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-common",
3
- "version": "4.22.16",
3
+ "version": "4.22.17",
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.50"
37
+ "svelte-entitlement": "^1.2.51"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@semantic-release/commit-analyzer": "^9.0.2",
41
41
  "@semantic-release/exec": "^6.0.3",
42
- "@semantic-release/release-notes-generator": "^10.0.3",
43
- "@sveltejs/vite-plugin-svelte": "^2.1.1",
42
+ "@semantic-release/release-notes-generator": "^11.0.1",
43
+ "@sveltejs/vite-plugin-svelte": "^2.3.0",
44
44
  "ava": "^5.2.0",
45
45
  "c8": "^7.13.0",
46
- "documentation": "^14.0.1",
46
+ "documentation": "^14.0.2",
47
47
  "mf-styling": "^1.7.54",
48
- "npm-pkgbuild": "^11.8.0",
49
- "semantic-release": "^21.0.1",
50
- "stylelint": "^15.6.0",
48
+ "npm-pkgbuild": "^11.8.6",
49
+ "semantic-release": "^21.0.2",
50
+ "stylelint": "^15.6.2",
51
51
  "stylelint-config-standard": "^33.0.0",
52
- "svelte": "^3.58.0",
53
- "testcafe": "^2.5.0",
54
- "vite": "^4.3.3"
52
+ "svelte": "^3.59.1",
53
+ "testcafe": "^2.6.0",
54
+ "vite": "^4.3.8"
55
55
  },
56
56
  "optionalDependencies": {
57
57
  "mf-hosting-cloudflare": "^1.0.5",
package/src/attribute.mjs CHANGED
@@ -10,7 +10,7 @@
10
10
  * @property {any} [default] the default value
11
11
  * @property {Function} [set] set the value
12
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
13
+ * @property {string[]|string} [env] environment variable use to provide the value
14
14
  */
15
15
 
16
16
  /**
package/src/filter.mjs CHANGED
@@ -23,8 +23,8 @@ function numberOp(a, b, op) {
23
23
 
24
24
  /**
25
25
  * Generate filter function.
26
- * @param {Object} filterBy
27
- * @param {Object} getters
26
+ * @param {Object} [filterBy]
27
+ * @param {Object} [getters]
28
28
  * @returns {Function}
29
29
  */
30
30
  export function filter(filterBy, getters) {
package/src/sorting.mjs CHANGED
@@ -26,8 +26,8 @@ export function toggleOrderBy(orderBy) {
26
26
  /**
27
27
  * Add sortable toggle button to a th node.
28
28
  * Synchronizes store value with the nodes "aria-sort" attribute.
29
- * @param {Node} the header node
30
- * @param {WritableStore} to keep in sync with sorting properties
29
+ * @param {Element} th the header node
30
+ * @param {WritableStore} store keep in sync with sorting properties
31
31
  */
32
32
  export function sortable(th, store) {
33
33
  const storeSubscription = store.subscribe(orderBy =>
@@ -76,14 +76,14 @@ export function sortable(th, store) {
76
76
 
77
77
  /**
78
78
  * Generate a sort function for a given sort-by set.
79
- * @param {Object} sortBy
80
- * @param {Object} getters
81
- * @return {Function} sorter
79
+ * @param {Object|undefined} [sortBy]
80
+ * @param {Object} [getters]
81
+ * @return {Function|undefined} sorter
82
82
  */
83
- export function sorter(sortBy, getters = {}) {
83
+ export function sorter(sortBy, getters) {
84
84
  if (sortBy) {
85
85
  for (const [key, value] of Object.entries(sortBy)) {
86
- const getter = getters[key] || getAttribute;
86
+ const getter = getters && getters[key] || getAttribute;
87
87
 
88
88
  let rev = 1;
89
89