blockgame/mods/bg_api/util_stringify.lua

12 lines
250 B
Lua
Raw Normal View History

function blockgame.stringify (tab)
if type(tab) == "table" then
local result = "{ "
for key, value in pairs(tab) do
result = result .. key .. ": " .. blockgame.stringify(value) .. ", "
end
return result .. "}"
else
return tab
end
end