es-toolkit 1.13.1-dev.297 → 1.13.1-dev.298

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.
@@ -10,7 +10,7 @@ import {
10
10
  set,
11
11
  startsWith,
12
12
  zipObjectDeep
13
- } from "../chunk-BJWAMCFH.mjs";
13
+ } from "../chunk-72G6BLM4.mjs";
14
14
  import "../chunk-NKLIE2OI.mjs";
15
15
  import "../chunk-XT74R35S.mjs";
16
16
  import {
@@ -71,7 +71,7 @@ import {
71
71
  } from "../chunk-6CLH5YZ2.mjs";
72
72
  import {
73
73
  clone
74
- } from "../chunk-U4JGKZ56.mjs";
74
+ } from "../chunk-VRUTBJYS.mjs";
75
75
  import {
76
76
  flattenObject
77
77
  } from "../chunk-XGQWTHW6.mjs";
package/dist/index.js CHANGED
@@ -912,7 +912,9 @@ function clone(obj) {
912
912
  return result;
913
913
  }
914
914
  if (typeof obj === "object") {
915
- return Object.assign({}, obj);
915
+ const prototype = Object.getPrototypeOf(obj);
916
+ const result = Object.create(prototype);
917
+ return Object.assign(result, obj);
916
918
  }
917
919
  return obj;
918
920
  }