es-toolkit 1.28.0-dev.911 → 1.28.0-dev.913
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.
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Deeply clones the given object.
|
|
3
|
+
*
|
|
4
|
+
* You can customize the deep cloning process using the `cloneValue` function.
|
|
5
|
+
* The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.
|
|
6
|
+
* If the function returns a value, that value is used;
|
|
7
|
+
* if it returns `undefined`, the default cloning method is used.
|
|
3
8
|
*
|
|
4
9
|
* @template T - The type of the object.
|
|
5
10
|
* @param {T} obj - The object to clone.
|
|
@@ -33,6 +38,6 @@
|
|
|
33
38
|
* console.log(clonedArr); // [2, 3, 4]
|
|
34
39
|
* console.log(clonedArr === arr); // false
|
|
35
40
|
*/
|
|
36
|
-
declare function cloneDeepWith<T>(obj: T, cloneValue: (value: any, key: PropertyKey | undefined,
|
|
41
|
+
declare function cloneDeepWith<T>(obj: T, cloneValue: (value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any): T;
|
|
37
42
|
|
|
38
43
|
export { cloneDeepWith };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Deeply clones the given object.
|
|
3
|
+
*
|
|
4
|
+
* You can customize the deep cloning process using the `cloneValue` function.
|
|
5
|
+
* The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.
|
|
6
|
+
* If the function returns a value, that value is used;
|
|
7
|
+
* if it returns `undefined`, the default cloning method is used.
|
|
3
8
|
*
|
|
4
9
|
* @template T - The type of the object.
|
|
5
10
|
* @param {T} obj - The object to clone.
|
|
@@ -33,6 +38,6 @@
|
|
|
33
38
|
* console.log(clonedArr); // [2, 3, 4]
|
|
34
39
|
* console.log(clonedArr === arr); // false
|
|
35
40
|
*/
|
|
36
|
-
declare function cloneDeepWith<T>(obj: T, cloneValue: (value: any, key: PropertyKey | undefined,
|
|
41
|
+
declare function cloneDeepWith<T>(obj: T, cloneValue: (value: any, key: PropertyKey | undefined, obj: T, stack: Map<any, any>) => any): T;
|
|
37
42
|
|
|
38
43
|
export { cloneDeepWith };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.28.0-dev.
|
|
4
|
+
"version": "1.28.0-dev.913+3393707a",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|