@anfenn/dync 1.0.23 → 1.0.24

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.
@@ -2401,10 +2401,23 @@ var buildCondition = (condition) => {
2401
2401
  }
2402
2402
  };
2403
2403
  var cloneValue = (value) => {
2404
+ if (value == null || typeof value !== "object") return value;
2405
+ if (!Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype) {
2406
+ const obj = value;
2407
+ let isFlat = true;
2408
+ for (const key in obj) {
2409
+ const v = obj[key];
2410
+ if (v !== null && typeof v === "object") {
2411
+ isFlat = false;
2412
+ break;
2413
+ }
2414
+ }
2415
+ if (isFlat) return { ...obj };
2416
+ }
2404
2417
  if (typeof globalThis.structuredClone === "function") {
2405
2418
  return globalThis.structuredClone(value);
2406
2419
  }
2407
- return JSON.parse(JSON.stringify(value ?? null));
2420
+ return JSON.parse(JSON.stringify(value));
2408
2421
  };
2409
2422
  var quoteIdentifier = (name) => `"${name.replace(/"/g, '""')}"`;
2410
2423
  var normalizeComparableValue = (value) => {
@@ -3819,4 +3832,4 @@ export {
3819
3832
  SqliteQueryContext,
3820
3833
  SQLiteAdapter2 as SQLiteAdapter
3821
3834
  };
3822
- //# sourceMappingURL=chunk-YSKDP34Q.js.map
3835
+ //# sourceMappingURL=chunk-QA2TX54K.js.map