mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-09-12 08:08:30 +02:00
13 lines
388 B
Lua
13 lines
388 B
Lua
|
|
--- Formats a key-value table of values as a string.
|
|
-- @param map table The table of key-value pairs to format.
|
|
-- @returns string The given table of key-value pairs formatted as a string.
|
|
local function format_map(map)
|
|
local result = {}
|
|
for key, value in pairs(map) do
|
|
table.insert(result, key.."\t"..tostring(value))
|
|
end
|
|
return table.concat(result, "\n")
|
|
end
|
|
|
|
return format_map |