@cocreate/mongodb 1.12.2 → 1.13.0
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 +14 -0
- package/package.json +2 -2
- package/src/index.js +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.13.0](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.3...v1.13.0) (2023-11-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* update dependecies for th latest features and bug fixes ([26967d0](https://github.com/CoCreate-app/CoCreate-mongodb/commit/26967d055fa90ea291d799b27dfa998dee8a3ccd))
|
|
7
|
+
|
|
8
|
+
## [1.12.3](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.2...v1.12.3) (2023-11-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* operator ([15a617e](https://github.com/CoCreate-app/CoCreate-mongodb/commit/15a617eec39db3d1b67c2fe0221f6340112e43ed))
|
|
14
|
+
|
|
1
15
|
## [1.12.2](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.1...v1.12.2) (2023-11-18)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/mongodb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
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",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"main": "./src/index.js",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@cocreate/utils": "^1.27.
|
|
48
|
+
"@cocreate/utils": "^1.27.4",
|
|
49
49
|
"mongodb": "^4.12.1"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/index.js
CHANGED
|
@@ -695,6 +695,12 @@ function createQuery(queries) {
|
|
|
695
695
|
query[key][item.operator] = item.value;
|
|
696
696
|
break;
|
|
697
697
|
case '$in':
|
|
698
|
+
if (!Array.isArray(item.value))
|
|
699
|
+
query[key][item.operator] = [item.value]
|
|
700
|
+
else
|
|
701
|
+
query[key] = { $in: item.value }
|
|
702
|
+
break;
|
|
703
|
+
|
|
698
704
|
case '$nin':
|
|
699
705
|
if (!Array.isArray(item.value))
|
|
700
706
|
query[key][item.operator] = [item.value]
|