@cocreate/mongodb 1.12.1 → 1.12.2

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,10 @@
1
+ ## [1.12.2](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.1...v1.12.2) (2023-11-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * handling of $nin operator ([56cbd21](https://github.com/CoCreate-app/CoCreate-mongodb/commit/56cbd21d3ff2c52da3477eba4a9090372954be1e))
7
+
1
8
  ## [1.12.1](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.0...v1.12.1) (2023-11-12)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/mongodb",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "A simple mongodb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "mongodb",
package/src/index.js CHANGED
@@ -697,9 +697,9 @@ function createQuery(queries) {
697
697
  case '$in':
698
698
  case '$nin':
699
699
  if (!Array.isArray(item.value))
700
- query[key] = [item.value]
700
+ query[key][item.operator] = [item.value]
701
701
  else
702
- query[key] = { $in: item.value }
702
+ query[key] = { $nin: item.value }
703
703
  break;
704
704
  case '$or':
705
705
  if (!query[item.operator])