@alwatr/deep-clone 5.5.28 → 5.5.29
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 +6 -0
- package/dist/main.cjs +1 -2
- package/dist/main.cjs.map +1 -1
- package/dist/main.mjs +1 -2
- package/dist/main.mjs.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [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
|
+
|
|
6
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)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @alwatr/deep-clone
|
package/dist/main.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** 📦 @alwatr/deep-clone v5.5.
|
|
2
|
-
__dev_mode__: console.debug("📦 @alwatr/deep-clone v5.5.28");
|
|
1
|
+
/** 📦 @alwatr/deep-clone v5.5.29 */
|
|
3
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});
|
|
4
3
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.cjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";qqBAAA,+GA0BO,SAAS,UAAa,IAAqC,CAChE,GAAI,KAAO,KAAM,OAAO,KAMxB,OAAO,KAAK,MAAM,KAAK,UAAU,GAAG,CAAC,CACvC",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/main.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** 📦 @alwatr/deep-clone v5.5.
|
|
2
|
-
__dev_mode__: console.debug("📦 @alwatr/deep-clone v5.5.28");
|
|
1
|
+
/** 📦 @alwatr/deep-clone v5.5.29 */
|
|
3
2
|
function deepClone(obj){if(obj==null)return null;return JSON.parse(JSON.stringify(obj))}export{deepClone};
|
|
4
3
|
//# sourceMappingURL=main.mjs.map
|
package/dist/main.mjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";AA0BO,SAAS,UAAa,IAAqC,CAChE,GAAI,KAAO,KAAM,OAAO,KAMxB,OAAO,KAAK,MAAM,KAAK,UAAU,GAAG,CAAC,CACvC",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/deep-clone",
|
|
3
3
|
"description": "Clone deeply nested objects and arrays in JavaScript.",
|
|
4
|
-
"version": "5.5.
|
|
4
|
+
"version": "5.5.29",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"bugs": "https://github.com/Alwatr/nanolib/issues",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@alwatr/nano-build": "6.4.
|
|
8
|
+
"@alwatr/nano-build": "6.4.2",
|
|
9
9
|
"@alwatr/prettier-config": "6.0.2",
|
|
10
10
|
"@alwatr/tsconfig-base": "6.0.4",
|
|
11
11
|
"typescript": "^5.9.3"
|
|
@@ -57,21 +57,21 @@
|
|
|
57
57
|
"directory": "packages/deep-clone"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
|
-
"b": "
|
|
61
|
-
"build": "
|
|
60
|
+
"b": "bun run build",
|
|
61
|
+
"build": "bun run build:ts && bun run build:es",
|
|
62
62
|
"build:es": "nano-build --preset=module",
|
|
63
63
|
"build:ts": "tsc --build",
|
|
64
|
-
"c": "
|
|
65
|
-
"cb": "
|
|
64
|
+
"c": "bun run clean",
|
|
65
|
+
"cb": "bun run clean && bun run build",
|
|
66
66
|
"clean": "rm -rfv dist *.tsbuildinfo",
|
|
67
|
-
"d": "
|
|
68
|
-
"w": "
|
|
69
|
-
"watch": "
|
|
70
|
-
"watch:es": "
|
|
71
|
-
"watch:ts": "
|
|
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
72
|
},
|
|
73
73
|
"sideEffects": false,
|
|
74
74
|
"type": "module",
|
|
75
75
|
"types": "./dist/main.d.ts",
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "c3889e3756b0a0f9b935a1b702a1373ac52cb379"
|
|
77
77
|
}
|