bunshin-clone 2.0.11 → 2.0.12

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.
@@ -138,7 +138,12 @@ function cloneMap(map, settings, refs) {
138
138
  }
139
139
  return result;
140
140
  }
141
- var OWN_DESCS = Object.getOwnPropertyDescriptors;
141
+
142
+ // node_modules/@y14e/own/dist/index.js
143
+ var {
144
+ getOwnPropertyDescriptors: OWN_DESCS,
145
+ getOwnPropertySymbols: OWN_SYMBOL_KEYS
146
+ } = Object;
142
147
  function OWN_ENUM_KEYS(object) {
143
148
  return [...OWN_ENUM_STRING_KEYS(object), ...OWN_ENUM_SYMBOL_KEYS(object)];
144
149
  }
@@ -166,9 +171,8 @@ function OWN_STRING_KEYS(object) {
166
171
  }
167
172
  return keys;
168
173
  }
169
- var OWN_SYMBOL_KEYS = Object.getOwnPropertySymbols;
170
174
  function isUnsafeKey(key) {
171
- return typeof key === "string" && (key === "__proto__" || key === "prototype" || key === "constructor");
175
+ return key === "__proto__" || key === "prototype" || key === "constructor";
172
176
  }
173
177
 
174
178
  // src/clone/plain-object.ts
@@ -136,7 +136,12 @@ function cloneMap(map, settings, refs) {
136
136
  }
137
137
  return result;
138
138
  }
139
- var OWN_DESCS = Object.getOwnPropertyDescriptors;
139
+
140
+ // node_modules/@y14e/own/dist/index.js
141
+ var {
142
+ getOwnPropertyDescriptors: OWN_DESCS,
143
+ getOwnPropertySymbols: OWN_SYMBOL_KEYS
144
+ } = Object;
140
145
  function OWN_ENUM_KEYS(object) {
141
146
  return [...OWN_ENUM_STRING_KEYS(object), ...OWN_ENUM_SYMBOL_KEYS(object)];
142
147
  }
@@ -164,9 +169,8 @@ function OWN_STRING_KEYS(object) {
164
169
  }
165
170
  return keys;
166
171
  }
167
- var OWN_SYMBOL_KEYS = Object.getOwnPropertySymbols;
168
172
  function isUnsafeKey(key) {
169
- return typeof key === "string" && (key === "__proto__" || key === "prototype" || key === "constructor");
173
+ return key === "__proto__" || key === "prototype" || key === "constructor";
170
174
  }
171
175
 
172
176
  // src/clone/plain-object.ts
package/dist/index.d.cts CHANGED
@@ -7,8 +7,8 @@ interface BunshinCloneOptions {
7
7
  }
8
8
  type PlainObject = Record<PropertyKey, unknown>;
9
9
 
10
- type Array_ = unknown[];
11
- declare function isPrimitiveArray(array: Array_): boolean;
10
+ type ReadonlyArray_ = ReadonlyArray<unknown>;
11
+ declare function isPrimitiveArray(array: ReadonlyArray_): boolean;
12
12
 
13
13
  declare function isObject(value: unknown): value is object;
14
14
  declare function isPlainObject(value: unknown): value is PlainObject;
package/dist/index.d.ts CHANGED
@@ -7,8 +7,8 @@ interface BunshinCloneOptions {
7
7
  }
8
8
  type PlainObject = Record<PropertyKey, unknown>;
9
9
 
10
- type Array_ = unknown[];
11
- declare function isPrimitiveArray(array: Array_): boolean;
10
+ type ReadonlyArray_ = ReadonlyArray<unknown>;
11
+ declare function isPrimitiveArray(array: ReadonlyArray_): boolean;
12
12
 
13
13
  declare function isObject(value: unknown): value is object;
14
14
  declare function isPlainObject(value: unknown): value is PlainObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunshin-clone",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "High-performance deep clone utility with descriptor support",
5
5
  "keywords": [
6
6
  "array",
@@ -68,9 +68,6 @@
68
68
  "prepublishOnly": "npm run build",
69
69
  "test": "bun test"
70
70
  },
71
- "dependencies": {
72
- "@y14e/own": "^1.0.5"
73
- },
74
71
  "devDependencies": {
75
72
  "bun-types": "latest",
76
73
  "tsup": "^8.0.0",
@@ -82,5 +79,8 @@
82
79
  },
83
80
  "allowScripts": {
84
81
  "esbuild": true
82
+ },
83
+ "dependencies": {
84
+ "@y14e/own": "^1.0.6"
85
85
  }
86
86
  }