svelte-common 6.12.0 → 6.13.1

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/filter.mjs +13 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-common",
3
- "version": "6.12.0",
3
+ "version": "6.13.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "pacc": "^3.1.8",
52
- "svelte-command": "^3.0.1",
52
+ "svelte-command": "^3.0.2",
53
53
  "svelte-entitlement": "^2.0.0"
54
54
  },
55
55
  "devDependencies": {
@@ -61,7 +61,7 @@
61
61
  "ava": "^6.1.3",
62
62
  "c8": "^10.1.2",
63
63
  "documentation": "^14.0.3",
64
- "mf-styling": "^3.1.7",
64
+ "mf-styling": "^3.1.8",
65
65
  "npm-pkgbuild": "^15.3.29",
66
66
  "semantic-release": "^24.0.0",
67
67
  "stylelint": "^16.8.1",
package/src/filter.mjs CHANGED
@@ -44,8 +44,18 @@ function allOp(value, against, op) {
44
44
 
45
45
  switch (typeof against) {
46
46
  case "object":
47
- if (against instanceof Date && value instanceof Date) {
48
- return dateOp(value, against, op);
47
+ if (value instanceof Date) {
48
+ if (
49
+ Array.isArray(against) &&
50
+ against[0] instanceof Date &&
51
+ against[1] instanceof Date
52
+ ) {
53
+ return dateOp(value, against[0], GREATER_EQUAL) && dateOp(value, against[1], LESS_EQUAL);
54
+ }
55
+
56
+ if (against instanceof Date) {
57
+ return dateOp(value, against, op);
58
+ }
49
59
  }
50
60
 
51
61
  if (value[Symbol.toPrimitive] && against[Symbol.toPrimitive]) {
@@ -99,7 +109,7 @@ function allOp(value, against, op) {
99
109
  return value.length ? numberOp(value, against, op) : true;
100
110
  case "object":
101
111
  if (value.length === 0) {
102
- return true;
112
+ return false;
103
113
  }
104
114
 
105
115
  if (against instanceof Date) {