Add concurrently

This commit is contained in:
Ralex91
2024-02-08 16:32:05 +01:00
parent 31122b9d2f
commit 8a9b8df7d2
14 changed files with 252 additions and 298 deletions

20
socket/utils/deepClone.js Normal file
View File

@@ -0,0 +1,20 @@
const deepClone = (obj) => {
if (obj === null || typeof obj !== "object") {
return obj
}
if (Array.isArray(obj)) {
return obj.map(deepClone)
}
const clonedObj = {}
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
clonedObj[key] = deepClone(obj[key])
}
}
return clonedObj
}
export default deepClone