Evil multitargetting
This commit is contained in:
parent
f9edec572a
commit
9bed4a8cb1
4 changed files with 54 additions and 8 deletions
14
src/util/tbl.luau
Normal file
14
src/util/tbl.luau
Normal file
|
@ -0,0 +1,14 @@
|
|||
--!strict
|
||||
local function deep_clone<T>(t: T): T
|
||||
local clone = table.clone(t :: any)
|
||||
for k, v in clone do
|
||||
if type(v) == "table" then
|
||||
clone[k] = deep_clone(v)
|
||||
end
|
||||
end
|
||||
return clone :: any
|
||||
end
|
||||
|
||||
return {
|
||||
deep_clone = deep_clone,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue