bunshin-clone 1.9.0 → 1.9.2

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.cjs CHANGED
@@ -66,10 +66,10 @@ function cloneBuffer(buffer, refs) {
66
66
  }
67
67
 
68
68
  // src/clone/blob.ts
69
- function cloneBlob(value, refs) {
70
- const { size, type } = value;
71
- const result = value.slice(0, size, type);
72
- refs.set(value, result);
69
+ function cloneBlob(blob, refs) {
70
+ const { size, type } = blob;
71
+ const result = blob.slice(0, size, type);
72
+ refs.set(blob, result);
73
73
  return result;
74
74
  }
75
75
 
@@ -208,16 +208,16 @@ function isPrimitiveSet(set) {
208
208
  }
209
209
 
210
210
  // src/clone/url.ts
211
- function cloneURL(value, refs) {
212
- const result = new URL(value.href);
213
- refs.set(value, result);
211
+ function cloneURL(url, refs) {
212
+ const result = new URL(url.href);
213
+ refs.set(url, result);
214
214
  return result;
215
215
  }
216
216
 
217
217
  // src/clone/url-search-params.ts
218
- function cloneURLSearchParams(value, refs) {
219
- const result = new URLSearchParams(value);
220
- refs.set(value, result);
218
+ function cloneURLSearchParams(params, refs) {
219
+ const result = new URLSearchParams(params);
220
+ refs.set(params, result);
221
221
  return result;
222
222
  }
223
223
 
package/dist/index.d.cts CHANGED
@@ -28,4 +28,4 @@ declare function isUnsafeKey(key: PropertyKey): boolean;
28
28
  declare function bunshinClone<T>(value: T, options?: Partial<BunshinCloneOptions>): T;
29
29
  declare function clone<T>(value: T, settings: BunshinCloneOptions, refs: Refs): T;
30
30
 
31
- export { OWN_DESCS, OWN_ENUM_STRING_KEYS, OWN_ENUM_SYMBOL_KEYS, OWN_STRING_KEYS, OWN_SYMBOL_KEYS, bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray, isUnsafeKey };
31
+ export { type BunshinCloneOptions, OWN_DESCS, OWN_ENUM_STRING_KEYS, OWN_ENUM_SYMBOL_KEYS, OWN_STRING_KEYS, OWN_SYMBOL_KEYS, type PlainObject, bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray, isUnsafeKey };
package/dist/index.d.ts CHANGED
@@ -28,4 +28,4 @@ declare function isUnsafeKey(key: PropertyKey): boolean;
28
28
  declare function bunshinClone<T>(value: T, options?: Partial<BunshinCloneOptions>): T;
29
29
  declare function clone<T>(value: T, settings: BunshinCloneOptions, refs: Refs): T;
30
30
 
31
- export { OWN_DESCS, OWN_ENUM_STRING_KEYS, OWN_ENUM_SYMBOL_KEYS, OWN_STRING_KEYS, OWN_SYMBOL_KEYS, bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray, isUnsafeKey };
31
+ export { type BunshinCloneOptions, OWN_DESCS, OWN_ENUM_STRING_KEYS, OWN_ENUM_SYMBOL_KEYS, OWN_STRING_KEYS, OWN_SYMBOL_KEYS, type PlainObject, bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray, isUnsafeKey };
package/dist/index.js CHANGED
@@ -64,10 +64,10 @@ function cloneBuffer(buffer, refs) {
64
64
  }
65
65
 
66
66
  // src/clone/blob.ts
67
- function cloneBlob(value, refs) {
68
- const { size, type } = value;
69
- const result = value.slice(0, size, type);
70
- refs.set(value, result);
67
+ function cloneBlob(blob, refs) {
68
+ const { size, type } = blob;
69
+ const result = blob.slice(0, size, type);
70
+ refs.set(blob, result);
71
71
  return result;
72
72
  }
73
73
 
@@ -206,16 +206,16 @@ function isPrimitiveSet(set) {
206
206
  }
207
207
 
208
208
  // src/clone/url.ts
209
- function cloneURL(value, refs) {
210
- const result = new URL(value.href);
211
- refs.set(value, result);
209
+ function cloneURL(url, refs) {
210
+ const result = new URL(url.href);
211
+ refs.set(url, result);
212
212
  return result;
213
213
  }
214
214
 
215
215
  // src/clone/url-search-params.ts
216
- function cloneURLSearchParams(value, refs) {
217
- const result = new URLSearchParams(value);
218
- refs.set(value, result);
216
+ function cloneURLSearchParams(params, refs) {
217
+ const result = new URLSearchParams(params);
218
+ refs.set(params, result);
219
219
  return result;
220
220
  }
221
221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunshin-clone",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "High-performance deep clone utility with descriptor support",
5
5
  "keywords": [
6
6
  "array",