function deepCopy(value) {
  switch (typeof value) {
    case "object": {
      if (Array.isArray(value)) {
        return value.map((item) => deepCopy(item));
      }
      if (value != null && (value.constructor === Object || value.constructor == null)) {
        return Object.fromEntries(Object.entries(value).map(([entryKey, entryValue]) => {
          return [entryKey, deepCopy(entryValue)];
        }));
      }
      return value;
    }
    case "bigint":
    case "boolean":
    case "function":
    case "number":
    case "string":
    case "symbol":
    case "undefined": {
      break;
    }
  }
  return value;
}
export {
  deepCopy as default
};
//# sourceMappingURL=index.mjs.map
