bfg-common 1.3.282 → 1.3.283
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/package.json +1 -1
- package/composables/useDeepClone.ts +0 -15
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const useDeepClone = (obj: any): any => {
|
|
2
|
-
if (Array.isArray(obj)) {
|
|
3
|
-
return obj.map((item) => useDeepClone(item))
|
|
4
|
-
} else if (obj && typeof obj === 'object') {
|
|
5
|
-
const clone: any = {}
|
|
6
|
-
for (const key in obj) {
|
|
7
|
-
if (obj.hasOwnProperty(key)) {
|
|
8
|
-
clone[key] = useDeepClone(obj[key])
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return clone
|
|
12
|
-
} else {
|
|
13
|
-
return obj
|
|
14
|
-
}
|
|
15
|
-
}
|