Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:Core
(view source)
Revision as of 05:05, 29 August 2018
553 bytes added
,
6 years ago
no edit summary
Line 275:
Line 275:
mw.log(tostring(x) .. " : " .. type(x))
mw.log(tostring(x) .. " : " .. type(x))
end
end
+
end
+
+
function Utils.show(x, i)
+
i = i or 0
+
local r = ""
+
if type(x) == "table" then
+
r = string.rep(" ", i) .. "{\n"
+
for k, v in pairs(x) do
+
if type(v) == "table" then
+
r = r .. string.rep(" ", i + 1) .. tostring(k) .. ": " .. Utils.show(v, i + 1) .. "\n"
+
else
+
r = r .. string.rep(" ", i + 1) .. tostring(k) .. ": " .. tostring(v) .. "\n"
+
end
+
end
+
r = r .. string.rep(" ", i) .. "}\n"
+
else
+
return tostring(x)
+
end
+
return r
end
end
がか
cssedit, gkautomate
7,064
edits