模組:沙盒/Emojiwiki/args
local p = {}
function table.pack(...)
return { n = select("#", ...); ... }
end
function p.dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. p.dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
function p.show(...)
local string = ""
local args = table.pack(...)
return p.dump(args)
end
return p