@alwatr/deep-clone 5.5.29 → 6.0.1
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/main.js +5 -0
- package/dist/main.js.map +10 -0
- package/package.json +37 -40
- package/src/main.ts +35 -0
- package/CHANGELOG.md +0 -419
- package/dist/main.cjs +0 -3
- package/dist/main.cjs.map +0 -7
- package/dist/main.mjs +0 -3
- package/dist/main.mjs.map +0 -7
package/dist/main.js
ADDED
package/dist/main.js.map
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/main.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\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"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";AA0BO,SAAS,CAAY,CAAC,EAAqC,CAChE,GAAI,GAAO,KAAM,OAAO,KAMxB,OAAO,KAAK,MAAM,KAAK,UAAU,CAAG,CAAC",
|
|
8
|
+
"debugId": "87D25B997AF78DD964756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/deep-clone",
|
|
3
|
+
"version": "6.0.1",
|
|
3
4
|
"description": "Clone deeply nested objects and arrays in JavaScript.",
|
|
4
|
-
"
|
|
5
|
+
"license": "MPL-2.0",
|
|
5
6
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"typescript": "^5.9.3"
|
|
7
|
+
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"directory": "packages/deep-clone",
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/Alwatr/nanolib"
|
|
12
12
|
},
|
|
13
|
+
"homepage": "https://github.com/Alwatr/nanolib/tree/next/packages/deep-clone#readme",
|
|
14
|
+
"bugs": "https://github.com/Alwatr/nanolib/issues",
|
|
13
15
|
"exports": {
|
|
14
16
|
".": {
|
|
15
17
|
"types": "./dist/main.d.ts",
|
|
16
|
-
"
|
|
17
|
-
"require": "./dist/main.cjs"
|
|
18
|
+
"default": "./dist/main.js"
|
|
18
19
|
}
|
|
19
20
|
},
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@alwatr/nano-build": "7.0.1",
|
|
24
|
+
"@alwatr/prettier-config": "7.0.1",
|
|
25
|
+
"@alwatr/tsconfig-base": "8.0.0",
|
|
26
|
+
"typescript": "^5.9.3"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"b": "bun run build",
|
|
30
|
+
"build": "bun run build:ts && bun run build:es",
|
|
31
|
+
"build:es": "nano-build --preset=module src/main.ts",
|
|
32
|
+
"build:ts": "tsc --build",
|
|
33
|
+
"c": "bun run clean",
|
|
34
|
+
"cb": "bun run clean && bun run build",
|
|
35
|
+
"clean": "rm -rfv dist *.tsbuildinfo",
|
|
36
|
+
"d": "bun run build:es && bun",
|
|
37
|
+
"w": "bun run watch",
|
|
38
|
+
"watch": "bun run watch:ts & bun run watch:es",
|
|
39
|
+
"watch:es": "bun run build:es --watch",
|
|
40
|
+
"watch:ts": "bun run build:ts --watch --preserveWatchOutput"
|
|
41
|
+
},
|
|
20
42
|
"files": [
|
|
21
|
-
"**/*.{js,mjs,cjs,map,d.ts,html,
|
|
43
|
+
"**/*.{js,mjs,cjs,ts,map,d.ts,html,LEGAL.txt}",
|
|
44
|
+
"README.md",
|
|
22
45
|
"LICENSE",
|
|
23
46
|
"!demo/**/*",
|
|
24
47
|
"!**/*.test.js"
|
|
25
48
|
],
|
|
26
|
-
"
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
27
52
|
"keywords": [
|
|
28
53
|
"alwatr",
|
|
29
54
|
"browser",
|
|
@@ -44,34 +69,6 @@
|
|
|
44
69
|
"utility",
|
|
45
70
|
"utils"
|
|
46
71
|
],
|
|
47
|
-
"license": "MPL-2.0",
|
|
48
|
-
"main": "./dist/main.cjs",
|
|
49
|
-
"module": "./dist/main.mjs",
|
|
50
72
|
"prettier": "@alwatr/prettier-config",
|
|
51
|
-
"
|
|
52
|
-
"access": "public"
|
|
53
|
-
},
|
|
54
|
-
"repository": {
|
|
55
|
-
"type": "git",
|
|
56
|
-
"url": "https://github.com/Alwatr/nanolib",
|
|
57
|
-
"directory": "packages/deep-clone"
|
|
58
|
-
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"b": "bun run build",
|
|
61
|
-
"build": "bun run build:ts && bun run build:es",
|
|
62
|
-
"build:es": "nano-build --preset=module",
|
|
63
|
-
"build:ts": "tsc --build",
|
|
64
|
-
"c": "bun run clean",
|
|
65
|
-
"cb": "bun run clean && bun run build",
|
|
66
|
-
"clean": "rm -rfv dist *.tsbuildinfo",
|
|
67
|
-
"d": "bun run build:es && bun --enable-source-maps --trace-warnings",
|
|
68
|
-
"w": "bun run watch",
|
|
69
|
-
"watch": "bun run watch:ts & bun run watch:es",
|
|
70
|
-
"watch:es": "bun run build:es --watch",
|
|
71
|
-
"watch:ts": "bun run build:ts --watch --preserveWatchOutput"
|
|
72
|
-
},
|
|
73
|
-
"sideEffects": false,
|
|
74
|
-
"type": "module",
|
|
75
|
-
"types": "./dist/main.d.ts",
|
|
76
|
-
"gitHead": "c3889e3756b0a0f9b935a1b702a1373ac52cb379"
|
|
73
|
+
"gitHead": "f843742e94d6ebed3921d57b624d9deb35c2c102"
|
|
77
74
|
}
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clone deeply nested objects and arrays.
|
|
3
|
+
*
|
|
4
|
+
* @param obj The object to clone.
|
|
5
|
+
* @returns A clone of the object.
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const obj2 = deepClone(obj1);
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export function deepClone<T>(obj: T): T;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Clone deeply nested objects and arrays.
|
|
15
|
+
*
|
|
16
|
+
* if the object is null or undefined, it returns null.
|
|
17
|
+
*
|
|
18
|
+
* @param obj The object to clone.
|
|
19
|
+
* @returns A clone of the object.
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const obj2 = deepClone(obj1);
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export function deepClone<T>(obj: T | null | undefined): T | null;
|
|
26
|
+
|
|
27
|
+
export function deepClone<T>(obj: T | null | undefined): T | null {
|
|
28
|
+
if (obj == null) return null;
|
|
29
|
+
// I don`t know why structuredClone is slower than stringify! but I think its changes in the future.
|
|
30
|
+
// if (typeof structuredClone === 'function') {
|
|
31
|
+
// return structuredClone(obj);
|
|
32
|
+
// }
|
|
33
|
+
// else
|
|
34
|
+
return JSON.parse(JSON.stringify(obj));
|
|
35
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [5.5.29](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.28...@alwatr/deep-clone@5.5.29) (2026-03-16)
|
|
7
|
-
|
|
8
|
-
### 🔨 Code Refactoring
|
|
9
|
-
|
|
10
|
-
* migrate build scripts from yarn to bun across multiple packages ([d90e962](https://github.com/Alwatr/nanolib/commit/d90e962f15e5c951e191d5f02341279b6472abc3))
|
|
11
|
-
|
|
12
|
-
## [5.5.28](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.27...@alwatr/deep-clone@5.5.28) (2026-02-18)
|
|
13
|
-
|
|
14
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
15
|
-
|
|
16
|
-
## [5.5.27](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.26...@alwatr/deep-clone@5.5.27) (2025-12-23)
|
|
17
|
-
|
|
18
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
19
|
-
|
|
20
|
-
## [5.5.26](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.25...@alwatr/deep-clone@5.5.26) (2025-12-13)
|
|
21
|
-
|
|
22
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
23
|
-
|
|
24
|
-
## [5.5.25](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.24...@alwatr/deep-clone@5.5.25) (2025-12-10)
|
|
25
|
-
|
|
26
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
27
|
-
|
|
28
|
-
## [5.5.24](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.23...@alwatr/deep-clone@5.5.24) (2025-11-18)
|
|
29
|
-
|
|
30
|
-
### 🔨 Code Refactoring
|
|
31
|
-
|
|
32
|
-
* remove unnecessary type declarations from tsconfig.json files ([89bcc7d](https://github.com/Alwatr/nanolib/commit/89bcc7db839807110b80f8ba34414ea9734d9c75))
|
|
33
|
-
|
|
34
|
-
## [5.5.23](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.22...@alwatr/deep-clone@5.5.23) (2025-11-15)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
37
|
-
|
|
38
|
-
## [5.5.22](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.21...@alwatr/deep-clone@5.5.22) (2025-11-15)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
41
|
-
|
|
42
|
-
## [5.5.21](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.20...@alwatr/deep-clone@5.5.21) (2025-11-04)
|
|
43
|
-
|
|
44
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
45
|
-
|
|
46
|
-
## [5.5.20](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.19...@alwatr/deep-clone@5.5.20) (2025-10-06)
|
|
47
|
-
|
|
48
|
-
### 🔗 Dependencies update
|
|
49
|
-
|
|
50
|
-
* bump the npm-dependencies group with 4 updates ([9825815](https://github.com/Alwatr/nanolib/commit/982581552bbb4b97dca52af5e93a80937f0c3109))
|
|
51
|
-
|
|
52
|
-
## [5.5.19](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.18...@alwatr/deep-clone@5.5.19) (2025-09-27)
|
|
53
|
-
|
|
54
|
-
### 🧹 Miscellaneous Chores
|
|
55
|
-
|
|
56
|
-
* exclude test files from package distribution ([86f4f2f](https://github.com/Alwatr/nanolib/commit/86f4f2f5985845c5cf3a3a9398de7b2f98ce53e7))
|
|
57
|
-
|
|
58
|
-
## [5.5.18](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.17...@alwatr/deep-clone@5.5.18) (2025-09-22)
|
|
59
|
-
|
|
60
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
61
|
-
|
|
62
|
-
## [5.5.17](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.16...@alwatr/deep-clone@5.5.17) (2025-09-22)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
65
|
-
|
|
66
|
-
## [5.5.16](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.15...@alwatr/deep-clone@5.5.16) (2025-09-21)
|
|
67
|
-
|
|
68
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
69
|
-
|
|
70
|
-
## [5.5.15](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.14...@alwatr/deep-clone@5.5.15) (2025-09-20)
|
|
71
|
-
|
|
72
|
-
### 🐛 Bug Fixes
|
|
73
|
-
|
|
74
|
-
* add sideEffects property to package.json files for better tree-shaking ([c7b9e74](https://github.com/Alwatr/nanolib/commit/c7b9e74e1920c8e35b438742de61883ca62da58c))
|
|
75
|
-
* add sideEffects property to package.json files for better tree-shaking ([e8402c4](https://github.com/Alwatr/nanolib/commit/e8402c481a14a1f807a37aaa862a936713d26176))
|
|
76
|
-
|
|
77
|
-
### 🧹 Miscellaneous Chores
|
|
78
|
-
|
|
79
|
-
* remove duplicate sideEffects property from multiple package.json files ([b123f86](https://github.com/Alwatr/nanolib/commit/b123f86be81481de2314aae9bb2eeb629743d24c))
|
|
80
|
-
|
|
81
|
-
## [5.5.14](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.13...@alwatr/deep-clone@5.5.14) (2025-09-19)
|
|
82
|
-
|
|
83
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
84
|
-
|
|
85
|
-
## [5.5.13](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.12...@alwatr/deep-clone@5.5.13) (2025-09-15)
|
|
86
|
-
|
|
87
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
88
|
-
|
|
89
|
-
## [5.5.12](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.11...@alwatr/deep-clone@5.5.12) (2025-09-13)
|
|
90
|
-
|
|
91
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
92
|
-
|
|
93
|
-
## [5.5.11](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.10...@alwatr/deep-clone@5.5.11) (2025-09-13)
|
|
94
|
-
|
|
95
|
-
### 🧹 Miscellaneous Chores
|
|
96
|
-
|
|
97
|
-
* remove package-tracer dependency and related code from fetch package ([96fe4e9](https://github.com/Alwatr/nanolib/commit/96fe4e9552a205f218ceed187c55e4e904a07089))
|
|
98
|
-
|
|
99
|
-
## [5.5.10](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.9...@alwatr/deep-clone@5.5.10) (2025-09-09)
|
|
100
|
-
|
|
101
|
-
### 🧹 Miscellaneous Chores
|
|
102
|
-
|
|
103
|
-
* remove trailing newlines from contributing sections in README files ([e8ab1bc](https://github.com/Alwatr/nanolib/commit/e8ab1bc43e0addea5ccd4c897c2cec597cb9e15f))
|
|
104
|
-
|
|
105
|
-
## [5.5.9](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.8...@alwatr/deep-clone@5.5.9) (2025-09-06)
|
|
106
|
-
|
|
107
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
108
|
-
|
|
109
|
-
## [5.5.8](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.7...@alwatr/deep-clone@5.5.8) (2025-09-05)
|
|
110
|
-
|
|
111
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
112
|
-
|
|
113
|
-
## [5.5.7](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.6...@alwatr/deep-clone@5.5.7) (2025-09-01)
|
|
114
|
-
|
|
115
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
116
|
-
|
|
117
|
-
## [5.5.6](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.5...@alwatr/deep-clone@5.5.6) (2025-08-23)
|
|
118
|
-
|
|
119
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
120
|
-
|
|
121
|
-
## [5.5.5](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.3...@alwatr/deep-clone@5.5.5) (2025-08-23)
|
|
122
|
-
|
|
123
|
-
### 🐛 Bug Fixes
|
|
124
|
-
|
|
125
|
-
* update license from AGPL-3.0-only to MPL-2.0 ([d20968e](https://github.com/Alwatr/nanolib/commit/d20968e60cc89b1dcdf9b96507178da6ed562f55))
|
|
126
|
-
* update package versions in multiple package.json files ([7638b1c](https://github.com/Alwatr/nanolib/commit/7638b1cafee2b4e0f97db7a89ac9fba6384b9b10))
|
|
127
|
-
|
|
128
|
-
### 🔨 Code Refactoring
|
|
129
|
-
|
|
130
|
-
* Updated all package.json files in the project to change dependency version specifiers from "workspace:^" to "workspace:*" for consistency and to allow for more flexible version resolution. ([db6a4f7](https://github.com/Alwatr/nanolib/commit/db6a4f76deec2d1d8039978144e4bc51b6f1a0e3))
|
|
131
|
-
|
|
132
|
-
### 🧹 Miscellaneous Chores
|
|
133
|
-
|
|
134
|
-
* reformat all package.json files ([ceda45d](https://github.com/Alwatr/nanolib/commit/ceda45de186667790474f729cb4b161a5148ce19))
|
|
135
|
-
|
|
136
|
-
### 🔗 Dependencies update
|
|
137
|
-
|
|
138
|
-
* update TypeScript and Jest versions across all packages to improve compatibility and performance ([31baf36](https://github.com/Alwatr/nanolib/commit/31baf366101e92e27db66a21c849fb101f19be47))
|
|
139
|
-
|
|
140
|
-
## [5.5.4](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.3...@alwatr/deep-clone@5.5.4) (2025-08-23)
|
|
141
|
-
|
|
142
|
-
### Code Refactoring
|
|
143
|
-
|
|
144
|
-
* Updated all package.json files in the project to change dependency version specifiers from "workspace:^" to "workspace:*" for consistency and to allow for more flexible version resolution. ([db6a4f7](https://github.com/Alwatr/nanolib/commit/db6a4f76deec2d1d8039978144e4bc51b6f1a0e3)) by @alimd
|
|
145
|
-
|
|
146
|
-
## <small>5.5.3 (2025-04-15)</small>
|
|
147
|
-
|
|
148
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
149
|
-
|
|
150
|
-
## [5.5.2](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.1...@alwatr/deep-clone@5.5.2) (2025-04-01)
|
|
151
|
-
|
|
152
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
153
|
-
|
|
154
|
-
## [5.5.1](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.5.0...@alwatr/deep-clone@5.5.1) (2025-03-18)
|
|
155
|
-
|
|
156
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
157
|
-
|
|
158
|
-
## [5.5.0](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@5.4.0...@alwatr/deep-clone@5.5.0) (2025-03-06)
|
|
159
|
-
|
|
160
|
-
### Miscellaneous Chores
|
|
161
|
-
|
|
162
|
-
* update username casing in changelog entries ([9722ac9](https://github.com/Alwatr/nanolib/commit/9722ac9a078438a4e8ebfa5826ea70e0e3a52ca6)) by @
|
|
163
|
-
|
|
164
|
-
### Dependencies update
|
|
165
|
-
|
|
166
|
-
* bump the development-dependencies group across 1 directory with 11 updates ([720c395](https://github.com/Alwatr/nanolib/commit/720c3954da55c929fe8fb16957121f4c51fb7f0c)) by @dependabot[bot]
|
|
167
|
-
|
|
168
|
-
## [5.4.0](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.8...@alwatr/deep-clone@5.4.0) (2025-02-18)
|
|
169
|
-
|
|
170
|
-
## 5.3.0 (2025-02-03)
|
|
171
|
-
|
|
172
|
-
### Miscellaneous Chores
|
|
173
|
-
|
|
174
|
-
* edit README ([3860b3d](https://github.com/Alwatr/nanolib/commit/3860b3df48ab82dc479d5236c2e8579df614aabf)) by @
|
|
175
|
-
|
|
176
|
-
### Dependencies update
|
|
177
|
-
|
|
178
|
-
* bump the development-dependencies group across 1 directory with 11 updates ([cb79d07](https://github.com/Alwatr/nanolib/commit/cb79d072a57c79e1c01abff1a293d6757bb65350)) by @
|
|
179
|
-
* update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages ([ddab05b](https://github.com/Alwatr/nanolib/commit/ddab05b5d767c30191f36a065e4bc88744e8e3fe)) by @
|
|
180
|
-
|
|
181
|
-
## 5.0.0 (2024-11-02)
|
|
182
|
-
|
|
183
|
-
### ⚠ BREAKING CHANGES
|
|
184
|
-
|
|
185
|
-
* To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies.
|
|
186
|
-
|
|
187
|
-
### Code Refactoring
|
|
188
|
-
|
|
189
|
-
* use the same version as @alwatr/nanolib ([60eb860](https://github.com/Alwatr/nanolib/commit/60eb860a0e33dfffe2d1d95e63ce54c60876be06)) by @
|
|
190
|
-
|
|
191
|
-
## [5.3.0](https://github.com/Alwatr/nanolib/compare/v5.2.1...v5.3.0) (2025-02-03)
|
|
192
|
-
|
|
193
|
-
### Miscellaneous Chores
|
|
194
|
-
|
|
195
|
-
* edit README ([3860b3d](https://github.com/Alwatr/nanolib/commit/3860b3df48ab82dc479d5236c2e8579df614aabf)) by @ArmanAsadian
|
|
196
|
-
|
|
197
|
-
### Dependencies update
|
|
198
|
-
|
|
199
|
-
* bump the development-dependencies group across 1 directory with 11 updates ([cb79d07](https://github.com/Alwatr/nanolib/commit/cb79d072a57c79e1c01abff1a293d6757bb65350)) by @dependabot[bot]
|
|
200
|
-
* update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages ([ddab05b](https://github.com/Alwatr/nanolib/commit/ddab05b5d767c30191f36a065e4bc88744e8e3fe)) by @alimd
|
|
201
|
-
|
|
202
|
-
## 5.0.0 (2024-11-02)
|
|
203
|
-
|
|
204
|
-
### ⚠ BREAKING CHANGES
|
|
205
|
-
|
|
206
|
-
* To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies.
|
|
207
|
-
|
|
208
|
-
### Features
|
|
209
|
-
|
|
210
|
-
* **deep-clone:** new package for deep clone obj/array ([9ac5379](https://github.com/Alwatr/nanolib/commit/9ac5379bd579b85d165a79b75bb782654167430d)) by @
|
|
211
|
-
* use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @
|
|
212
|
-
|
|
213
|
-
### Bug Fixes
|
|
214
|
-
|
|
215
|
-
* all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @
|
|
216
|
-
* **deep-clone:** deps ([2bce58c](https://github.com/Alwatr/nanolib/commit/2bce58c0742e3547a4bbc6c9efb792d5dca9375b)) by @
|
|
217
|
-
* package.json include files ([97b35d1](https://github.com/Alwatr/nanolib/commit/97b35d11bf4125f482f595db81f284804d2870ed)) by @
|
|
218
|
-
* package.json include files ([129a9a5](https://github.com/Alwatr/nanolib/commit/129a9a5df31f1199769432d7e689d213f2dcaa43)) by @
|
|
219
|
-
* package.json include files ([053fc10](https://github.com/Alwatr/nanolib/commit/053fc10b518038647136db9ada2433e27ecb2e63)) by @
|
|
220
|
-
* tsBuildInfoFile path in tsconfig.json files ([9c4ba01](https://github.com/Alwatr/nanolib/commit/9c4ba01afdd6657de4e5feef09bb6ee03d9ce053)) by @
|
|
221
|
-
* update to latest nano-build with preset ([a4d3c35](https://github.com/Alwatr/nanolib/commit/a4d3c35f9d86521312bd16dd9853519f4ed2e0b4)) by @
|
|
222
|
-
|
|
223
|
-
### Code Refactoring
|
|
224
|
-
|
|
225
|
-
* prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @
|
|
226
|
-
* use the same version as @alwatr/nanolib ([60eb860](https://github.com/Alwatr/nanolib/commit/60eb860a0e33dfffe2d1d95e63ce54c60876be06)) by @
|
|
227
|
-
|
|
228
|
-
### Miscellaneous Chores
|
|
229
|
-
|
|
230
|
-
* **deep-clone:** change the license to AGPL-3.0 ([062b9c5](https://github.com/Alwatr/nanolib/commit/062b9c5f0e6fc78fa39101d538f3ba8720ab073a)) by @
|
|
231
|
-
* include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @
|
|
232
|
-
* rename logger env ([38443ad](https://github.com/Alwatr/nanolib/commit/38443ade4677e857b5ebd4be417f5f2eb1818c87)) by @
|
|
233
|
-
* Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @
|
|
234
|
-
* update clean script to remove all .tsbuildinfo files ([91f1ff2](https://github.com/Alwatr/nanolib/commit/91f1ff20c964d5327879c267f530a131526544d8)) by @
|
|
235
|
-
* Update debug command in package.json ([be8403d](https://github.com/Alwatr/nanolib/commit/be8403dec754f2117259bb915b110ea386596401)) by @
|
|
236
|
-
* update package keywords ([200afcf](https://github.com/Alwatr/nanolib/commit/200afcf53ae1db0e86a775c24ee1d83da771b1c0)) by @
|
|
237
|
-
* Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
|
|
238
|
-
|
|
239
|
-
### Dependencies update
|
|
240
|
-
|
|
241
|
-
* bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @
|
|
242
|
-
* bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @
|
|
243
|
-
* upd ([451d025](https://github.com/Alwatr/nanolib/commit/451d0255ba96ed55f897a6f44f62cf4e6d2b12be)) by @
|
|
244
|
-
* update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @
|
|
245
|
-
* update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
|
|
246
|
-
|
|
247
|
-
## [1.1.8](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.7...@alwatr/deep-clone@1.1.8) (2024-11-02)
|
|
248
|
-
|
|
249
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
250
|
-
|
|
251
|
-
## [1.1.7](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.6...@alwatr/deep-clone@1.1.7) (2024-10-25)
|
|
252
|
-
|
|
253
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
254
|
-
|
|
255
|
-
## [1.1.6](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.5...@alwatr/deep-clone@1.1.6) (2024-10-12)
|
|
256
|
-
|
|
257
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
258
|
-
|
|
259
|
-
## [1.1.5](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.4...@alwatr/deep-clone@1.1.5) (2024-10-11)
|
|
260
|
-
|
|
261
|
-
### Code Refactoring
|
|
262
|
-
|
|
263
|
-
- prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar
|
|
264
|
-
|
|
265
|
-
## [1.1.4](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.3...@alwatr/deep-clone@1.1.4) (2024-10-11)
|
|
266
|
-
|
|
267
|
-
### Miscellaneous Chores
|
|
268
|
-
|
|
269
|
-
- include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @alimd
|
|
270
|
-
|
|
271
|
-
## [1.1.3](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.2...@alwatr/deep-clone@1.1.3) (2024-10-11)
|
|
272
|
-
|
|
273
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
274
|
-
|
|
275
|
-
## [1.1.2](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.1...@alwatr/deep-clone@1.1.2) (2024-10-10)
|
|
276
|
-
|
|
277
|
-
### Dependencies update
|
|
278
|
-
|
|
279
|
-
- bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot]
|
|
280
|
-
|
|
281
|
-
## [1.1.1](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.1.0...@alwatr/deep-clone@1.1.1) (2024-10-08)
|
|
282
|
-
|
|
283
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
284
|
-
|
|
285
|
-
## [1.1.0](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.24...@alwatr/deep-clone@1.1.0) (2024-09-29)
|
|
286
|
-
|
|
287
|
-
### Features
|
|
288
|
-
|
|
289
|
-
- use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar
|
|
290
|
-
|
|
291
|
-
### Bug Fixes
|
|
292
|
-
|
|
293
|
-
- all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar
|
|
294
|
-
|
|
295
|
-
### Miscellaneous Chores
|
|
296
|
-
|
|
297
|
-
- **deep-clone:** change the license to AGPL-3.0 ([062b9c5](https://github.com/Alwatr/nanolib/commit/062b9c5f0e6fc78fa39101d538f3ba8720ab073a)) by @ArmanAsadian
|
|
298
|
-
- Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @alimd
|
|
299
|
-
|
|
300
|
-
## [1.0.24](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.23...@alwatr/deep-clone@1.0.24) (2024-09-21)
|
|
301
|
-
|
|
302
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
303
|
-
|
|
304
|
-
## [1.0.23](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.22...@alwatr/deep-clone@1.0.23) (2024-09-15)
|
|
305
|
-
|
|
306
|
-
### Dependencies update
|
|
307
|
-
|
|
308
|
-
- bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
|
|
309
|
-
|
|
310
|
-
## [1.0.22](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.21...@alwatr/deep-clone@1.0.22) (2024-08-31)
|
|
311
|
-
|
|
312
|
-
### Miscellaneous Chores
|
|
313
|
-
|
|
314
|
-
- Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
|
|
315
|
-
|
|
316
|
-
## [1.0.21](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.20...@alwatr/deep-clone@1.0.21) (2024-08-31)
|
|
317
|
-
|
|
318
|
-
### Dependencies update
|
|
319
|
-
|
|
320
|
-
- update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @alimd
|
|
321
|
-
|
|
322
|
-
## [1.0.20](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.19...@alwatr/deep-clone@1.0.20) (2024-07-04)
|
|
323
|
-
|
|
324
|
-
### Dependencies update
|
|
325
|
-
|
|
326
|
-
- update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
|
|
327
|
-
|
|
328
|
-
## [1.0.19](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.18...@alwatr/deep-clone@1.0.19) (2024-05-12)
|
|
329
|
-
|
|
330
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
331
|
-
|
|
332
|
-
## [1.0.18](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.17...@alwatr/deep-clone@1.0.18) (2024-04-25)
|
|
333
|
-
|
|
334
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
335
|
-
|
|
336
|
-
## [1.0.17](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.16...@alwatr/deep-clone@1.0.17) (2024-03-28)
|
|
337
|
-
|
|
338
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
339
|
-
|
|
340
|
-
## [1.0.16](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.15...@alwatr/deep-clone@1.0.16) (2024-01-31)
|
|
341
|
-
|
|
342
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
343
|
-
|
|
344
|
-
## [1.0.15](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.14...@alwatr/deep-clone@1.0.15) (2024-01-24)
|
|
345
|
-
|
|
346
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
347
|
-
|
|
348
|
-
## [1.0.14](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.13...@alwatr/deep-clone@1.0.14) (2024-01-16)
|
|
349
|
-
|
|
350
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
351
|
-
|
|
352
|
-
## [1.0.13](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.12...@alwatr/deep-clone@1.0.13) (2024-01-03)
|
|
353
|
-
|
|
354
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
355
|
-
|
|
356
|
-
## [1.0.12](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.11...@alwatr/deep-clone@1.0.12) (2024-01-03)
|
|
357
|
-
|
|
358
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
359
|
-
|
|
360
|
-
## [1.0.11](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.10...@alwatr/deep-clone@1.0.11) (2023-12-26)
|
|
361
|
-
|
|
362
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
363
|
-
|
|
364
|
-
## [1.0.10](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.9...@alwatr/deep-clone@1.0.10) (2023-12-26)
|
|
365
|
-
|
|
366
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
367
|
-
|
|
368
|
-
## [1.0.9](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.8...@alwatr/deep-clone@1.0.9) (2023-12-23)
|
|
369
|
-
|
|
370
|
-
### Bug Fixes
|
|
371
|
-
|
|
372
|
-
- tsBuildInfoFile path in tsconfig.json files ([9c4ba01](https://github.com/Alwatr/nanolib/commit/9c4ba01afdd6657de4e5feef09bb6ee03d9ce053)) by @
|
|
373
|
-
|
|
374
|
-
## [1.0.8](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.7...@alwatr/deep-clone@1.0.8) (2023-12-23)
|
|
375
|
-
|
|
376
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
377
|
-
|
|
378
|
-
## [1.0.7](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.6...@alwatr/deep-clone@1.0.7) (2023-12-23)
|
|
379
|
-
|
|
380
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
381
|
-
|
|
382
|
-
## [1.0.6](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.5...@alwatr/deep-clone@1.0.6) (2023-12-23)
|
|
383
|
-
|
|
384
|
-
### Bug Fixes
|
|
385
|
-
|
|
386
|
-
- update to latest nano-build with preset ([a4d3c35](https://github.com/Alwatr/nanolib/commit/a4d3c35f9d86521312bd16dd9853519f4ed2e0b4)) by @
|
|
387
|
-
|
|
388
|
-
## [1.0.5](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.4...@alwatr/deep-clone@1.0.5) (2023-12-22)
|
|
389
|
-
|
|
390
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
391
|
-
|
|
392
|
-
## [1.0.4](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.3...@alwatr/deep-clone@1.0.4) (2023-12-22)
|
|
393
|
-
|
|
394
|
-
**Note:** Version bump only for package @alwatr/deep-clone
|
|
395
|
-
|
|
396
|
-
## [1.0.3](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.2...@alwatr/deep-clone@1.0.3) (2023-12-22)
|
|
397
|
-
|
|
398
|
-
### Bug Fixes
|
|
399
|
-
|
|
400
|
-
- package.json include files ([97b35d1](https://github.com/Alwatr/nanolib/commit/97b35d11bf4125f482f595db81f284804d2870ed)) by @
|
|
401
|
-
|
|
402
|
-
## [1.0.2](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.1...@alwatr/deep-clone@1.0.2) (2023-12-22)
|
|
403
|
-
|
|
404
|
-
### Bug Fixes
|
|
405
|
-
|
|
406
|
-
- package.json include files ([129a9a5](https://github.com/Alwatr/nanolib/commit/129a9a5df31f1199769432d7e689d213f2dcaa43)) by @
|
|
407
|
-
|
|
408
|
-
## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/deep-clone@1.0.0...@alwatr/deep-clone@1.0.1) (2023-12-22)
|
|
409
|
-
|
|
410
|
-
### Bug Fixes
|
|
411
|
-
|
|
412
|
-
- **deep-clone:** deps ([2bce58c](https://github.com/Alwatr/nanolib/commit/2bce58c0742e3547a4bbc6c9efb792d5dca9375b)) by @alimd
|
|
413
|
-
- package.json include files ([053fc10](https://github.com/Alwatr/nanolib/commit/053fc10b518038647136db9ada2433e27ecb2e63)) by @alimd
|
|
414
|
-
|
|
415
|
-
# 1.0.0 (2023-12-22)
|
|
416
|
-
|
|
417
|
-
### Features
|
|
418
|
-
|
|
419
|
-
- **deep-clone:** new package for deep clone obj/array ([9ac5379](https://github.com/Alwatr/nanolib/commit/9ac5379bd579b85d165a79b75bb782654167430d)) by @alimd
|
package/dist/main.cjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/** 📦 @alwatr/deep-clone v5.5.29 */
|
|
2
|
-
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var main_exports={};__export(main_exports,{deepClone:()=>deepClone});module.exports=__toCommonJS(main_exports);function deepClone(obj){if(obj==null)return null;return JSON.parse(JSON.stringify(obj))}0&&(module.exports={deepClone});
|
|
3
|
-
//# sourceMappingURL=main.cjs.map
|
package/dist/main.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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 // 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": ";qqBAAA,+GA0BO,SAAS,UAAa,IAAqC,CAChE,GAAI,KAAO,KAAM,OAAO,KAMxB,OAAO,KAAK,MAAM,KAAK,UAAU,GAAG,CAAC,CACvC",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/main.mjs
DELETED
package/dist/main.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 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 // 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,SAAS,UAAa,IAAqC,CAChE,GAAI,KAAO,KAAM,OAAO,KAMxB,OAAO,KAAK,MAAM,KAAK,UAAU,GAAG,CAAC,CACvC",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|