@cocreate/indexeddb 1.18.0 → 1.19.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [1.19.1](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.19.0...v1.19.1) (2023-11-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * handle object value string ([bf09800](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/bf098005b0d9e494a6a5bb8941774516c3163c0b))
7
+ * let operator ([9e577f7](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/9e577f73bc57f283eb813a4b936d0c1d795fec44))
8
+
9
+ # [1.19.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.18.0...v1.19.0) (2023-11-19)
10
+
11
+
12
+ ### Features
13
+
14
+ * update dependecies for th latest features and bug fixes ([c03d97c](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/c03d97cbe886c2023d0f2d1bbe485ae836f5f0a9))
15
+
1
16
  # [1.18.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.17.2...v1.18.0) (2023-11-16)
2
17
 
3
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/indexeddb",
3
- "version": "1.18.0",
3
+ "version": "1.19.1",
4
4
  "description": "A simple indexeddb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "indexeddb",
@@ -58,6 +58,6 @@
58
58
  "webpack-log": "^3.0.1"
59
59
  },
60
60
  "dependencies": {
61
- "@cocreate/utils": "^1.27.1"
61
+ "@cocreate/utils": "^1.27.4"
62
62
  }
63
63
  }
package/src/index.js CHANGED
@@ -414,7 +414,9 @@ async function processObject(data, newData, database, array, type) {
414
414
  try {
415
415
  if (!data[type])
416
416
  data[type] = []
417
- if (data[type] && !Array.isArray(data[type]))
417
+ else if (typeof data[type] === 'string')
418
+ data[type] = [{ _id: data[type] }]
419
+ else if (!Array.isArray(data[type]))
418
420
  data[type] = [data[type]]
419
421
 
420
422
  let isFilter
@@ -788,8 +790,9 @@ function dotNotationToObjectUpdate(data, object = {}) {
788
790
  let oldObject = new Object(newObject)
789
791
  let keys = key.replace(/\[(\d+)\]/g, '.$1').split('.');
790
792
  let value = data[key]
793
+ let operator
791
794
  if (keys[0].startsWith('$'))
792
- var operator = keys.shift()
795
+ operator = keys.shift()
793
796
 
794
797
  let length = keys.length - 1
795
798
  for (let i = 0; i < keys.length; i++) {