@dnax/core 0.7.2 → 0.7.3

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.
@@ -2,6 +2,7 @@ import type { optionsType, searchType } from "./@types";
2
2
  import * as orama from "@orama/orama";
3
3
  import fs from "fs-extra";
4
4
  import _ from "lodash";
5
+ import cleanDeep from "clean-deep";
5
6
  import { ObjectId } from "mongodb";
6
7
  import path from "path";
7
8
  class searchEngine {
@@ -47,6 +48,7 @@ class searchEngine {
47
48
  let ids = [];
48
49
  if (Array.isArray(documents)) {
49
50
  documents.map((doc) => {
51
+ doc = cleanDeep(doc);
50
52
  doc.id = doc?._id || doc?.id || new ObjectId().toString();
51
53
  doc._id = doc?.id;
52
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {