Baseless/Helpers/Append.lua

15 lines
288 B
Lua
Raw Normal View History

2020-04-26 03:48:47 +00:00
-- Append multiple tables together
--
-- *Values are not deep copies
function Append(...)
local newArray = {}
for _, array in ipairs({...}) do
if array then
for _, value in ipairs(array) do
table.insert(newArray, value)
end
end
end
return newArray
end