@cocreate/indexeddb 1.14.6 → 1.15.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 CHANGED
@@ -1,3 +1,11 @@
1
+ # [1.15.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.6...v1.15.0) (2023-10-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * ObjectId() returns an object containg the parts iof the _id along with a toString() function ([5d9212b](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/5d9212ba20fb6b26159471a2c09c10ddde94b4e0))
7
+ * ObjectId() returns an object containg the parts iof the _id along with a toString() function ([d6b8ccd](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/d6b8ccddf073e1bd6e13d76966b1ac3bd083b14d))
8
+
1
9
  ## [1.14.6](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.5...v1.14.6) (2023-10-21)
2
10
 
3
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/indexeddb",
3
- "version": "1.14.6",
3
+ "version": "1.15.0",
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",
package/src/index.js CHANGED
@@ -480,7 +480,7 @@ async function processObject(data, newData, database, array, type) {
480
480
  data[type][i]['organization_id'] = data.organization_id
481
481
 
482
482
  if (!data[type][i]._id)
483
- data[type][i]['_id'] = ObjectId()
483
+ data[type][i]['_id'] = ObjectId().toString()
484
484
  data[type][i] = dotNotationToObject(data[type][i])
485
485
  data[type][i]['created'] = { on: data.timeStamp, by: data.user_id || data.clientId }
486
486
 
@@ -595,7 +595,7 @@ function openCursor(objectStore, range, direction, data, newData, isFilter, limi
595
595
  try {
596
596
  data[type][i]._id = ObjectId(data[type][i]._id);
597
597
  } catch (error) {
598
- data[type][i]._id = ObjectId()
598
+ data[type][i]._id = ObjectId().toString()
599
599
  }
600
600
 
601
601
  let result