@alwatr/deep-clone 1.0.15 → 1.0.17
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/CHANGELOG.md +15 -7
- package/dist/main.cjs +1 -1
- package/dist/main.cjs.map +2 -2
- package/dist/main.mjs +1 -1
- package/dist/main.mjs.map +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.17](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.16...@alwatr/deep-clone@1.0.17) (2024-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @alwatr/deep-clone
|
|
9
|
+
|
|
10
|
+
## [1.0.16](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.15...@alwatr/deep-clone@1.0.16) (2024-01-31)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @alwatr/deep-clone
|
|
13
|
+
|
|
6
14
|
## [1.0.15](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.14...@alwatr/deep-clone@1.0.15) (2024-01-24)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @alwatr/deep-clone
|
|
@@ -31,7 +39,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
31
39
|
|
|
32
40
|
### Bug Fixes
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
- tsBuildInfoFile path in tsconfig.json files ([9c4ba01](https://github.com/Alwatr/nanolib/commit/9c4ba01afdd6657de4e5feef09bb6ee03d9ce053)) by @
|
|
35
43
|
|
|
36
44
|
## [1.0.8](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.7...@alwatr/deep-clone@1.0.8) (2023-12-23)
|
|
37
45
|
|
|
@@ -45,7 +53,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
45
53
|
|
|
46
54
|
### Bug Fixes
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
- update to latest nano-build with preset ([a4d3c35](https://github.com/Alwatr/nanolib/commit/a4d3c35f9d86521312bd16dd9853519f4ed2e0b4)) by @
|
|
49
57
|
|
|
50
58
|
## [1.0.5](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.4...@alwatr/deep-clone@1.0.5) (2023-12-22)
|
|
51
59
|
|
|
@@ -59,23 +67,23 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
59
67
|
|
|
60
68
|
### Bug Fixes
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
- package.json include files ([97b35d1](https://github.com/Alwatr/nanolib/commit/97b35d11bf4125f482f595db81f284804d2870ed)) by @
|
|
63
71
|
|
|
64
72
|
## [1.0.2](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.1...@alwatr/deep-clone@1.0.2) (2023-12-22)
|
|
65
73
|
|
|
66
74
|
### Bug Fixes
|
|
67
75
|
|
|
68
|
-
|
|
76
|
+
- package.json include files ([129a9a5](https://github.com/Alwatr/nanolib/commit/129a9a5df31f1199769432d7e689d213f2dcaa43)) by @
|
|
69
77
|
|
|
70
78
|
## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.0...@alwatr/deep-clone@1.0.1) (2023-12-22)
|
|
71
79
|
|
|
72
80
|
### Bug Fixes
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
- **deep-clone:** deps ([2bce58c](https://github.com/Alwatr/nanolib/commit/2bce58c0742e3547a4bbc6c9efb792d5dca9375b)) by @AliMD
|
|
83
|
+
- package.json include files ([053fc10](https://github.com/Alwatr/nanolib/commit/053fc10b518038647136db9ada2433e27ecb2e63)) by @AliMD
|
|
76
84
|
|
|
77
85
|
# 1.0.0 (2023-12-22)
|
|
78
86
|
|
|
79
87
|
### Features
|
|
80
88
|
|
|
81
|
-
|
|
89
|
+
- **deep-clone:** new package for deep clone obj/array ([9ac5379](https://github.com/Alwatr/nanolib/commit/9ac5379bd579b85d165a79b75bb782654167430d)) by @AliMD
|
package/dist/main.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @alwatr/deep-clone v1.0.
|
|
1
|
+
/* @alwatr/deep-clone v1.0.17 */
|
|
2
2
|
"use strict";var o=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var d=(n,e)=>{for(var u in e)o(n,u,{get:e[u],enumerable:!0})},f=(n,e,u,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of T(e))!i.call(n,l)&&l!==u&&o(n,l,{get:()=>e[l],enumerable:!(r=t(e,l))||r.enumerable});return n};var p=n=>f(o({},"__esModule",{value:!0}),n);var x={};d(x,{deepClone:()=>c});module.exports=p(x);function c(n){return n==null?null:JSON.parse(JSON.stringify(n))}0&&(module.exports={deepClone});
|
|
3
3
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Clone deeply nested objects and arrays.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T): T;\n\n/**\n * Clone deeply nested objects and arrays.\n *\n * if the object is null or undefined, it returns null.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T | null | undefined): T | null;\n\nexport function deepClone<T>(obj: T | null | undefined): T | null {\n if (obj == null) return null;\n return JSON.parse(JSON.stringify(obj));\n}\n"],
|
|
5
|
-
"mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GA0BO,SAASE,EAAaE,EAAqC,CAChE,OAAIA,GAAO,KAAa,
|
|
4
|
+
"sourcesContent": ["/**\n * Clone deeply nested objects and arrays.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T): T;\n\n/**\n * Clone deeply nested objects and arrays.\n *\n * if the object is null or undefined, it returns null.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T | null | undefined): T | null;\n\nexport function deepClone<T>(obj: T | null | undefined): T | null {\n if (obj == null) return null;\n // I don`t know why structuredClone is slower than stringify! but I think its changes in the future.\n // if (typeof structuredClone === 'function') {\n // return structuredClone(obj);\n // }\n // else\n return JSON.parse(JSON.stringify(obj));\n}\n"],
|
|
5
|
+
"mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GA0BO,SAASE,EAAaE,EAAqC,CAChE,OAAIA,GAAO,KAAa,KAMjB,KAAK,MAAM,KAAK,UAAUA,CAAG,CAAC,CACvC",
|
|
6
6
|
"names": ["main_exports", "__export", "deepClone", "__toCommonJS", "obj"]
|
|
7
7
|
}
|
package/dist/main.mjs
CHANGED
package/dist/main.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Clone deeply nested objects and arrays.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T): T;\n\n/**\n * Clone deeply nested objects and arrays.\n *\n * if the object is null or undefined, it returns null.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T | null | undefined): T | null;\n\nexport function deepClone<T>(obj: T | null | undefined): T | null {\n if (obj == null) return null;\n return JSON.parse(JSON.stringify(obj));\n}\n"],
|
|
5
|
-
"mappings": ";AA0BO,SAASA,EAAaC,EAAqC,CAChE,OAAIA,GAAO,KAAa,
|
|
4
|
+
"sourcesContent": ["/**\n * Clone deeply nested objects and arrays.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T): T;\n\n/**\n * Clone deeply nested objects and arrays.\n *\n * if the object is null or undefined, it returns null.\n *\n * @param obj The object to clone.\n * @returns A clone of the object.\n * @example\n * ```typescript\n * const obj2 = deepClone(obj1);\n * ```\n */\nexport function deepClone<T>(obj: T | null | undefined): T | null;\n\nexport function deepClone<T>(obj: T | null | undefined): T | null {\n if (obj == null) return null;\n // I don`t know why structuredClone is slower than stringify! but I think its changes in the future.\n // if (typeof structuredClone === 'function') {\n // return structuredClone(obj);\n // }\n // else\n return JSON.parse(JSON.stringify(obj));\n}\n"],
|
|
5
|
+
"mappings": ";AA0BO,SAASA,EAAaC,EAAqC,CAChE,OAAIA,GAAO,KAAa,KAMjB,KAAK,MAAM,KAAK,UAAUA,CAAG,CAAC,CACvC",
|
|
6
6
|
"names": ["deepClone", "obj"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/deep-clone",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Clone deeply nested objects and arrays in JavaScript.",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"clean": "rm -rfv dist *.tsbuildinfo"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@alwatr/nano-build": "^1.3.
|
|
70
|
+
"@alwatr/nano-build": "^1.3.4",
|
|
71
71
|
"@alwatr/prettier-config": "^1.0.4",
|
|
72
|
-
"@alwatr/tsconfig-base": "^1.1.
|
|
73
|
-
"typescript": "^5.
|
|
72
|
+
"@alwatr/tsconfig-base": "^1.1.2",
|
|
73
|
+
"typescript": "^5.4.3"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "df149736d1e85335aaeb9c547ff3bdd1161f9b33"
|
|
76
76
|
}
|