mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-05 15:11:15 +00:00
* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
12 lines
279 B
TypeScript
12 lines
279 B
TypeScript
/**
|
|
* 深拷贝
|
|
* @param obj 需要拷贝的对象
|
|
* @returns 拷贝后的对象
|
|
*/
|
|
export const deepClone = <T>(obj: T): T => {
|
|
// 我们这里只只用于配置项,所以直接使用字符串就行
|
|
const newObj = JSON.parse(JSON.stringify(obj));
|
|
|
|
return newObj;
|
|
};
|