bunshin-clone 2.0.4 → 2.0.6
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.
- package/dist/index.bundle.cjs +40 -45
- package/dist/index.bundle.js +40 -45
- package/dist/index.cjs +41 -44
- package/dist/index.js +42 -45
- package/package.json +4 -4
package/dist/index.bundle.cjs
CHANGED
|
@@ -189,8 +189,22 @@ function isUnsafeKey(key) {
|
|
|
189
189
|
function clonePlainObject(object, settings, refs) {
|
|
190
190
|
const result = Object.create(Object.getPrototypeOf(object));
|
|
191
191
|
refs.set(object, result);
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
const { preserveDescriptors, preserveSymbolKeys } = settings;
|
|
193
|
+
if (!preserveDescriptors) {
|
|
194
|
+
for (const key of (!preserveSymbolKeys ? OWN_ENUM_STRING_KEYS : OWN_ENUM_KEYS)(object)) {
|
|
195
|
+
result[key] = clone(object[key], settings, refs);
|
|
196
|
+
}
|
|
197
|
+
return result;
|
|
198
|
+
}
|
|
199
|
+
const descs = OWN_DESCS(object);
|
|
200
|
+
for (const key of (!preserveSymbolKeys ? OWN_STRING_KEYS : OWN_KEYS)(
|
|
201
|
+
object
|
|
202
|
+
)) {
|
|
203
|
+
const desc = { ...descs[key] };
|
|
204
|
+
if ("value" in desc) {
|
|
205
|
+
desc.value = clone(desc.value, settings, refs);
|
|
206
|
+
}
|
|
207
|
+
Object.defineProperty(result, key, desc);
|
|
194
208
|
}
|
|
195
209
|
return result;
|
|
196
210
|
}
|
|
@@ -241,21 +255,30 @@ function cloneURLSearchParams(params, refs) {
|
|
|
241
255
|
return result;
|
|
242
256
|
}
|
|
243
257
|
|
|
244
|
-
// src/
|
|
245
|
-
function
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
desc.value = clone(desc.value, settings, refs);
|
|
255
|
-
}
|
|
256
|
-
Object.defineProperty(result, key, desc);
|
|
258
|
+
// src/options.ts
|
|
259
|
+
function resolveOptions(options) {
|
|
260
|
+
let {
|
|
261
|
+
preserveBufferSharing = false,
|
|
262
|
+
preserveDescriptors = false,
|
|
263
|
+
preserveSymbolKeys = false
|
|
264
|
+
} = options;
|
|
265
|
+
if (typeof preserveBufferSharing !== "boolean") {
|
|
266
|
+
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
267
|
+
preserveBufferSharing = false;
|
|
257
268
|
}
|
|
258
|
-
|
|
269
|
+
if (typeof preserveDescriptors !== "boolean") {
|
|
270
|
+
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
271
|
+
preserveDescriptors = false;
|
|
272
|
+
}
|
|
273
|
+
if (typeof preserveSymbolKeys !== "boolean") {
|
|
274
|
+
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
275
|
+
preserveSymbolKeys = false;
|
|
276
|
+
}
|
|
277
|
+
return {
|
|
278
|
+
preserveBufferSharing,
|
|
279
|
+
preserveDescriptors,
|
|
280
|
+
preserveSymbolKeys
|
|
281
|
+
};
|
|
259
282
|
}
|
|
260
283
|
|
|
261
284
|
// src/index.ts
|
|
@@ -269,14 +292,10 @@ function clone(value, settings, refs) {
|
|
|
269
292
|
if (refs.has(value)) {
|
|
270
293
|
return refs.get(value);
|
|
271
294
|
}
|
|
272
|
-
const isClonePlainObject = isPlainObject(value);
|
|
273
|
-
if (settings.preserveDescriptors && isClonePlainObject) {
|
|
274
|
-
return cloneWithDescriptors(value, settings, refs);
|
|
275
|
-
}
|
|
276
295
|
if (Array.isArray(value)) {
|
|
277
296
|
return cloneArray(value, settings, refs);
|
|
278
297
|
}
|
|
279
|
-
if (
|
|
298
|
+
if (isPlainObject(value)) {
|
|
280
299
|
return clonePlainObject(value, settings, refs);
|
|
281
300
|
}
|
|
282
301
|
if (value instanceof Map) {
|
|
@@ -319,30 +338,6 @@ function clone(value, settings, refs) {
|
|
|
319
338
|
refs.set(value, value);
|
|
320
339
|
return value;
|
|
321
340
|
}
|
|
322
|
-
function resolveOptions(options) {
|
|
323
|
-
let {
|
|
324
|
-
preserveBufferSharing = false,
|
|
325
|
-
preserveDescriptors = false,
|
|
326
|
-
preserveSymbolKeys = false
|
|
327
|
-
} = options;
|
|
328
|
-
if (typeof preserveBufferSharing !== "boolean") {
|
|
329
|
-
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
330
|
-
preserveBufferSharing = false;
|
|
331
|
-
}
|
|
332
|
-
if (typeof preserveDescriptors !== "boolean") {
|
|
333
|
-
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
334
|
-
preserveDescriptors = false;
|
|
335
|
-
}
|
|
336
|
-
if (typeof preserveSymbolKeys !== "boolean") {
|
|
337
|
-
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
338
|
-
preserveSymbolKeys = false;
|
|
339
|
-
}
|
|
340
|
-
return {
|
|
341
|
-
preserveBufferSharing,
|
|
342
|
-
preserveDescriptors,
|
|
343
|
-
preserveSymbolKeys
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
341
|
|
|
347
342
|
exports.bunshinClone = bunshinClone;
|
|
348
343
|
exports.clone = clone;
|
package/dist/index.bundle.js
CHANGED
|
@@ -187,8 +187,22 @@ function isUnsafeKey(key) {
|
|
|
187
187
|
function clonePlainObject(object, settings, refs) {
|
|
188
188
|
const result = Object.create(Object.getPrototypeOf(object));
|
|
189
189
|
refs.set(object, result);
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
const { preserveDescriptors, preserveSymbolKeys } = settings;
|
|
191
|
+
if (!preserveDescriptors) {
|
|
192
|
+
for (const key of (!preserveSymbolKeys ? OWN_ENUM_STRING_KEYS : OWN_ENUM_KEYS)(object)) {
|
|
193
|
+
result[key] = clone(object[key], settings, refs);
|
|
194
|
+
}
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
const descs = OWN_DESCS(object);
|
|
198
|
+
for (const key of (!preserveSymbolKeys ? OWN_STRING_KEYS : OWN_KEYS)(
|
|
199
|
+
object
|
|
200
|
+
)) {
|
|
201
|
+
const desc = { ...descs[key] };
|
|
202
|
+
if ("value" in desc) {
|
|
203
|
+
desc.value = clone(desc.value, settings, refs);
|
|
204
|
+
}
|
|
205
|
+
Object.defineProperty(result, key, desc);
|
|
192
206
|
}
|
|
193
207
|
return result;
|
|
194
208
|
}
|
|
@@ -239,21 +253,30 @@ function cloneURLSearchParams(params, refs) {
|
|
|
239
253
|
return result;
|
|
240
254
|
}
|
|
241
255
|
|
|
242
|
-
// src/
|
|
243
|
-
function
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
desc.value = clone(desc.value, settings, refs);
|
|
253
|
-
}
|
|
254
|
-
Object.defineProperty(result, key, desc);
|
|
256
|
+
// src/options.ts
|
|
257
|
+
function resolveOptions(options) {
|
|
258
|
+
let {
|
|
259
|
+
preserveBufferSharing = false,
|
|
260
|
+
preserveDescriptors = false,
|
|
261
|
+
preserveSymbolKeys = false
|
|
262
|
+
} = options;
|
|
263
|
+
if (typeof preserveBufferSharing !== "boolean") {
|
|
264
|
+
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
265
|
+
preserveBufferSharing = false;
|
|
255
266
|
}
|
|
256
|
-
|
|
267
|
+
if (typeof preserveDescriptors !== "boolean") {
|
|
268
|
+
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
269
|
+
preserveDescriptors = false;
|
|
270
|
+
}
|
|
271
|
+
if (typeof preserveSymbolKeys !== "boolean") {
|
|
272
|
+
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
273
|
+
preserveSymbolKeys = false;
|
|
274
|
+
}
|
|
275
|
+
return {
|
|
276
|
+
preserveBufferSharing,
|
|
277
|
+
preserveDescriptors,
|
|
278
|
+
preserveSymbolKeys
|
|
279
|
+
};
|
|
257
280
|
}
|
|
258
281
|
|
|
259
282
|
// src/index.ts
|
|
@@ -267,14 +290,10 @@ function clone(value, settings, refs) {
|
|
|
267
290
|
if (refs.has(value)) {
|
|
268
291
|
return refs.get(value);
|
|
269
292
|
}
|
|
270
|
-
const isClonePlainObject = isPlainObject(value);
|
|
271
|
-
if (settings.preserveDescriptors && isClonePlainObject) {
|
|
272
|
-
return cloneWithDescriptors(value, settings, refs);
|
|
273
|
-
}
|
|
274
293
|
if (Array.isArray(value)) {
|
|
275
294
|
return cloneArray(value, settings, refs);
|
|
276
295
|
}
|
|
277
|
-
if (
|
|
296
|
+
if (isPlainObject(value)) {
|
|
278
297
|
return clonePlainObject(value, settings, refs);
|
|
279
298
|
}
|
|
280
299
|
if (value instanceof Map) {
|
|
@@ -317,29 +336,5 @@ function clone(value, settings, refs) {
|
|
|
317
336
|
refs.set(value, value);
|
|
318
337
|
return value;
|
|
319
338
|
}
|
|
320
|
-
function resolveOptions(options) {
|
|
321
|
-
let {
|
|
322
|
-
preserveBufferSharing = false,
|
|
323
|
-
preserveDescriptors = false,
|
|
324
|
-
preserveSymbolKeys = false
|
|
325
|
-
} = options;
|
|
326
|
-
if (typeof preserveBufferSharing !== "boolean") {
|
|
327
|
-
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
328
|
-
preserveBufferSharing = false;
|
|
329
|
-
}
|
|
330
|
-
if (typeof preserveDescriptors !== "boolean") {
|
|
331
|
-
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
332
|
-
preserveDescriptors = false;
|
|
333
|
-
}
|
|
334
|
-
if (typeof preserveSymbolKeys !== "boolean") {
|
|
335
|
-
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
336
|
-
preserveSymbolKeys = false;
|
|
337
|
-
}
|
|
338
|
-
return {
|
|
339
|
-
preserveBufferSharing,
|
|
340
|
-
preserveDescriptors,
|
|
341
|
-
preserveSymbolKeys
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
339
|
|
|
345
340
|
export { bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray };
|
package/dist/index.cjs
CHANGED
|
@@ -151,8 +151,22 @@ function cloneMap(map, settings, refs) {
|
|
|
151
151
|
function clonePlainObject(object, settings, refs) {
|
|
152
152
|
const result = Object.create(Object.getPrototypeOf(object));
|
|
153
153
|
refs.set(object, result);
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
const { preserveDescriptors, preserveSymbolKeys } = settings;
|
|
155
|
+
if (!preserveDescriptors) {
|
|
156
|
+
for (const key of (!preserveSymbolKeys ? own.OWN_ENUM_STRING_KEYS : own.OWN_ENUM_KEYS)(object)) {
|
|
157
|
+
result[key] = clone(object[key], settings, refs);
|
|
158
|
+
}
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
161
|
+
const descs = own.OWN_DESCS(object);
|
|
162
|
+
for (const key of (!preserveSymbolKeys ? own.OWN_STRING_KEYS : own.OWN_KEYS)(
|
|
163
|
+
object
|
|
164
|
+
)) {
|
|
165
|
+
const desc = { ...descs[key] };
|
|
166
|
+
if ("value" in desc) {
|
|
167
|
+
desc.value = clone(desc.value, settings, refs);
|
|
168
|
+
}
|
|
169
|
+
Object.defineProperty(result, key, desc);
|
|
156
170
|
}
|
|
157
171
|
return result;
|
|
158
172
|
}
|
|
@@ -202,20 +216,31 @@ function cloneURLSearchParams(params, refs) {
|
|
|
202
216
|
refs.set(params, result);
|
|
203
217
|
return result;
|
|
204
218
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
Object.defineProperty(result, key, desc);
|
|
219
|
+
|
|
220
|
+
// src/options.ts
|
|
221
|
+
function resolveOptions(options) {
|
|
222
|
+
let {
|
|
223
|
+
preserveBufferSharing = false,
|
|
224
|
+
preserveDescriptors = false,
|
|
225
|
+
preserveSymbolKeys = false
|
|
226
|
+
} = options;
|
|
227
|
+
if (typeof preserveBufferSharing !== "boolean") {
|
|
228
|
+
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
229
|
+
preserveBufferSharing = false;
|
|
217
230
|
}
|
|
218
|
-
|
|
231
|
+
if (typeof preserveDescriptors !== "boolean") {
|
|
232
|
+
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
233
|
+
preserveDescriptors = false;
|
|
234
|
+
}
|
|
235
|
+
if (typeof preserveSymbolKeys !== "boolean") {
|
|
236
|
+
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
237
|
+
preserveSymbolKeys = false;
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
240
|
+
preserveBufferSharing,
|
|
241
|
+
preserveDescriptors,
|
|
242
|
+
preserveSymbolKeys
|
|
243
|
+
};
|
|
219
244
|
}
|
|
220
245
|
|
|
221
246
|
// src/index.ts
|
|
@@ -229,14 +254,10 @@ function clone(value, settings, refs) {
|
|
|
229
254
|
if (refs.has(value)) {
|
|
230
255
|
return refs.get(value);
|
|
231
256
|
}
|
|
232
|
-
const isClonePlainObject = isPlainObject(value);
|
|
233
|
-
if (settings.preserveDescriptors && isClonePlainObject) {
|
|
234
|
-
return cloneWithDescriptors(value, settings, refs);
|
|
235
|
-
}
|
|
236
257
|
if (Array.isArray(value)) {
|
|
237
258
|
return cloneArray(value, settings, refs);
|
|
238
259
|
}
|
|
239
|
-
if (
|
|
260
|
+
if (isPlainObject(value)) {
|
|
240
261
|
return clonePlainObject(value, settings, refs);
|
|
241
262
|
}
|
|
242
263
|
if (value instanceof Map) {
|
|
@@ -279,30 +300,6 @@ function clone(value, settings, refs) {
|
|
|
279
300
|
refs.set(value, value);
|
|
280
301
|
return value;
|
|
281
302
|
}
|
|
282
|
-
function resolveOptions(options) {
|
|
283
|
-
let {
|
|
284
|
-
preserveBufferSharing = false,
|
|
285
|
-
preserveDescriptors = false,
|
|
286
|
-
preserveSymbolKeys = false
|
|
287
|
-
} = options;
|
|
288
|
-
if (typeof preserveBufferSharing !== "boolean") {
|
|
289
|
-
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
290
|
-
preserveBufferSharing = false;
|
|
291
|
-
}
|
|
292
|
-
if (typeof preserveDescriptors !== "boolean") {
|
|
293
|
-
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
294
|
-
preserveDescriptors = false;
|
|
295
|
-
}
|
|
296
|
-
if (typeof preserveSymbolKeys !== "boolean") {
|
|
297
|
-
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
298
|
-
preserveSymbolKeys = false;
|
|
299
|
-
}
|
|
300
|
-
return {
|
|
301
|
-
preserveBufferSharing,
|
|
302
|
-
preserveDescriptors,
|
|
303
|
-
preserveSymbolKeys
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
303
|
|
|
307
304
|
exports.bunshinClone = bunshinClone;
|
|
308
305
|
exports.clone = clone;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OWN_ENUM_STRING_KEYS, OWN_ENUM_KEYS, OWN_DESCS, OWN_STRING_KEYS, OWN_KEYS } from '@y14e/own';
|
|
2
2
|
|
|
3
3
|
// src/utils.ts
|
|
4
4
|
function isObject(value) {
|
|
@@ -149,8 +149,22 @@ function cloneMap(map, settings, refs) {
|
|
|
149
149
|
function clonePlainObject(object, settings, refs) {
|
|
150
150
|
const result = Object.create(Object.getPrototypeOf(object));
|
|
151
151
|
refs.set(object, result);
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
const { preserveDescriptors, preserveSymbolKeys } = settings;
|
|
153
|
+
if (!preserveDescriptors) {
|
|
154
|
+
for (const key of (!preserveSymbolKeys ? OWN_ENUM_STRING_KEYS : OWN_ENUM_KEYS)(object)) {
|
|
155
|
+
result[key] = clone(object[key], settings, refs);
|
|
156
|
+
}
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
159
|
+
const descs = OWN_DESCS(object);
|
|
160
|
+
for (const key of (!preserveSymbolKeys ? OWN_STRING_KEYS : OWN_KEYS)(
|
|
161
|
+
object
|
|
162
|
+
)) {
|
|
163
|
+
const desc = { ...descs[key] };
|
|
164
|
+
if ("value" in desc) {
|
|
165
|
+
desc.value = clone(desc.value, settings, refs);
|
|
166
|
+
}
|
|
167
|
+
Object.defineProperty(result, key, desc);
|
|
154
168
|
}
|
|
155
169
|
return result;
|
|
156
170
|
}
|
|
@@ -200,20 +214,31 @@ function cloneURLSearchParams(params, refs) {
|
|
|
200
214
|
refs.set(params, result);
|
|
201
215
|
return result;
|
|
202
216
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
Object.defineProperty(result, key, desc);
|
|
217
|
+
|
|
218
|
+
// src/options.ts
|
|
219
|
+
function resolveOptions(options) {
|
|
220
|
+
let {
|
|
221
|
+
preserveBufferSharing = false,
|
|
222
|
+
preserveDescriptors = false,
|
|
223
|
+
preserveSymbolKeys = false
|
|
224
|
+
} = options;
|
|
225
|
+
if (typeof preserveBufferSharing !== "boolean") {
|
|
226
|
+
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
227
|
+
preserveBufferSharing = false;
|
|
215
228
|
}
|
|
216
|
-
|
|
229
|
+
if (typeof preserveDescriptors !== "boolean") {
|
|
230
|
+
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
231
|
+
preserveDescriptors = false;
|
|
232
|
+
}
|
|
233
|
+
if (typeof preserveSymbolKeys !== "boolean") {
|
|
234
|
+
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
235
|
+
preserveSymbolKeys = false;
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
preserveBufferSharing,
|
|
239
|
+
preserveDescriptors,
|
|
240
|
+
preserveSymbolKeys
|
|
241
|
+
};
|
|
217
242
|
}
|
|
218
243
|
|
|
219
244
|
// src/index.ts
|
|
@@ -227,14 +252,10 @@ function clone(value, settings, refs) {
|
|
|
227
252
|
if (refs.has(value)) {
|
|
228
253
|
return refs.get(value);
|
|
229
254
|
}
|
|
230
|
-
const isClonePlainObject = isPlainObject(value);
|
|
231
|
-
if (settings.preserveDescriptors && isClonePlainObject) {
|
|
232
|
-
return cloneWithDescriptors(value, settings, refs);
|
|
233
|
-
}
|
|
234
255
|
if (Array.isArray(value)) {
|
|
235
256
|
return cloneArray(value, settings, refs);
|
|
236
257
|
}
|
|
237
|
-
if (
|
|
258
|
+
if (isPlainObject(value)) {
|
|
238
259
|
return clonePlainObject(value, settings, refs);
|
|
239
260
|
}
|
|
240
261
|
if (value instanceof Map) {
|
|
@@ -277,29 +298,5 @@ function clone(value, settings, refs) {
|
|
|
277
298
|
refs.set(value, value);
|
|
278
299
|
return value;
|
|
279
300
|
}
|
|
280
|
-
function resolveOptions(options) {
|
|
281
|
-
let {
|
|
282
|
-
preserveBufferSharing = false,
|
|
283
|
-
preserveDescriptors = false,
|
|
284
|
-
preserveSymbolKeys = false
|
|
285
|
-
} = options;
|
|
286
|
-
if (typeof preserveBufferSharing !== "boolean") {
|
|
287
|
-
console.warn("Invalid preserveBufferSharing option. Fallback: false.");
|
|
288
|
-
preserveBufferSharing = false;
|
|
289
|
-
}
|
|
290
|
-
if (typeof preserveDescriptors !== "boolean") {
|
|
291
|
-
console.warn("Invalid preserveDescriptors option. Fallback: false.");
|
|
292
|
-
preserveDescriptors = false;
|
|
293
|
-
}
|
|
294
|
-
if (typeof preserveSymbolKeys !== "boolean") {
|
|
295
|
-
console.warn("Invalid preserveSymbolKeys option. Fallback: false.");
|
|
296
|
-
preserveSymbolKeys = false;
|
|
297
|
-
}
|
|
298
|
-
return {
|
|
299
|
-
preserveBufferSharing,
|
|
300
|
-
preserveDescriptors,
|
|
301
|
-
preserveSymbolKeys
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
301
|
|
|
305
302
|
export { bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunshin-clone",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "High-performance deep clone utility with descriptor support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -68,6 +68,9 @@
|
|
|
68
68
|
"prepublishOnly": "npm run build",
|
|
69
69
|
"test": "bun test"
|
|
70
70
|
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@y14e/own": "^1.0.3"
|
|
73
|
+
},
|
|
71
74
|
"devDependencies": {
|
|
72
75
|
"bun-types": "latest",
|
|
73
76
|
"tsup": "^8.0.0",
|
|
@@ -79,8 +82,5 @@
|
|
|
79
82
|
},
|
|
80
83
|
"allowScripts": {
|
|
81
84
|
"esbuild": true
|
|
82
|
-
},
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"@y14e/own": "^1.0.3"
|
|
85
85
|
}
|
|
86
86
|
}
|