@briza/illogical 1.5.8 → 1.5.9

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/changelog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # illogical changelog
2
2
 
3
+ ## 1.5.9
4
+
5
+ - Modify OVERLAP expression such that the OVERLAP of two empty arrays returns true
6
+
3
7
  ## 1.5.8
4
8
 
5
9
  - Introduce the backtick syntax for condition referencing keys that contain dot delimiters
@@ -549,6 +549,9 @@ class Overlap extends Comparison {
549
549
  }
550
550
  const leftArray = left;
551
551
  const rightArray = right;
552
+ if (leftArray.length === 0 && rightArray.length === 0) {
553
+ return true;
554
+ }
552
555
  return leftArray.some(element => rightArray.includes(element));
553
556
  }
554
557
 
package/lib/illogical.js CHANGED
@@ -553,6 +553,9 @@ class Overlap extends Comparison {
553
553
  }
554
554
  const leftArray = left;
555
555
  const rightArray = right;
556
+ if (leftArray.length === 0 && rightArray.length === 0) {
557
+ return true;
558
+ }
556
559
  return leftArray.some(element => rightArray.includes(element));
557
560
  }
558
561
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@briza/illogical",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "A micro conditional javascript engine used to parse the raw logical and comparison expressions, evaluate the expression in the given data context, and provide access to a text form of the given expressions.",
5
5
  "main": "lib/illogical.js",
6
6
  "module": "lib/illogical.esm.js",