@cocreate/utils 1.12.3 → 1.12.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.12.5](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.12.4...v1.12.5) (2022-11-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump dependencies ([83e94fc](https://github.com/CoCreate-app/CoCreate-utils/commit/83e94fc3911cb241b05d3700e33abeff35ed1aab))
7
+
8
+ ## [1.12.4](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.12.3...v1.12.4) (2022-11-28)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * search - if operator or and no match found return false ([27dc82d](https://github.com/CoCreate-app/CoCreate-utils/commit/27dc82d6ea56983fa46736fba0f4cab3f31a4ea0))
14
+
1
15
  ## [1.12.3](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.12.2...v1.12.3) (2022-11-27)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/utils",
3
- "version": "1.12.3",
3
+ "version": "1.12.5",
4
4
  "description": "A simple utils component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "utils",
@@ -61,6 +61,6 @@
61
61
  "webpack-log": "^3.0.1"
62
62
  },
63
63
  "dependencies": {
64
- "@cocreate/docs": "^1.4.6"
64
+ "@cocreate/docs": "^1.4.7"
65
65
  }
66
66
  }
package/src/utils.js CHANGED
@@ -315,7 +315,7 @@
315
315
  function searchData(data, searches) {
316
316
  const search = searches['value']
317
317
  const operator = searches['type']
318
-
318
+
319
319
  for (var key in data) {
320
320
  let value = data[key];
321
321
  let status = false;
@@ -348,9 +348,11 @@
348
348
  if (operator == 'and' && !status) {
349
349
  return false;
350
350
  }
351
- }
352
351
 
352
+ }
353
353
  }
354
+ if (search.length && operator == 'or')
355
+ return false
354
356
 
355
357
  }
356
358