svelte-common 6.5.4 → 6.5.5
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 +2 -2
- package/src/filter.mjs +17 -0
- package/src/pagination.mjs +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-common",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"c8": "^8.0.1",
|
|
54
54
|
"documentation": "^14.0.2",
|
|
55
55
|
"mf-styling": "^3.0.2",
|
|
56
|
-
"npm-pkgbuild": "^11.10.
|
|
56
|
+
"npm-pkgbuild": "^11.10.11",
|
|
57
57
|
"semantic-release": "^21.0.7",
|
|
58
58
|
"stylelint": "^15.10.2",
|
|
59
59
|
"stylelint-config-standard": "^34.0.0",
|
package/src/filter.mjs
CHANGED
|
@@ -70,6 +70,14 @@ function allOp(value, against, op) {
|
|
|
70
70
|
if (against instanceof RegExp) {
|
|
71
71
|
return against.test(value);
|
|
72
72
|
}
|
|
73
|
+
|
|
74
|
+
if (Array.isArray(against) || against instanceof Set) {
|
|
75
|
+
for (const i of against) {
|
|
76
|
+
if (value.match(i)) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
return value.match(against);
|
|
@@ -78,6 +86,15 @@ function allOp(value, against, op) {
|
|
|
78
86
|
if (against instanceof RegExp) {
|
|
79
87
|
return against.test(value);
|
|
80
88
|
}
|
|
89
|
+
|
|
90
|
+
if (Array.isArray(against) || against instanceof Set) {
|
|
91
|
+
for (const i of against) {
|
|
92
|
+
if (numberOp(value, i, op)) {
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
81
98
|
return numberOp(value, against, op);
|
|
82
99
|
case "boolean":
|
|
83
100
|
return value == against;
|
package/src/pagination.mjs
CHANGED
|
@@ -219,7 +219,7 @@ export function pageNavigation(elem, pg) {
|
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
221
|
* Generade actual sequence of page numbers to navigate to.
|
|
222
|
-
* @param {number}
|
|
222
|
+
* @param {number} numberOfPages
|
|
223
223
|
* @param {number} currentPage
|
|
224
224
|
* @param {number} numberOfItems
|
|
225
225
|
* @return {Iterator<number>}
|
|
@@ -254,10 +254,8 @@ export function* navigationItems(
|
|
|
254
254
|
break;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
+
|
|
257
258
|
/*
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
259
|
const pageJumps = [
|
|
262
260
|
{ maxPages: 10, stepping: [1] },
|
|
263
261
|
{ maxPages: 100, stepping: [1, 10] },
|